Protect workbook using a password

I try to include a pasword to open the workbook using xlspadlock.com 2024.2 but this option does not work at all. The options to generate in your program don’t appear. I test the option adding a sub to save de protected file as xlsm, when I open de final file extracted by the macro, It opens with out asking for the pasword.

Sure, as long as you don’t configure XLS Padlock to avoid that, it is permitted.
This is explained in our doc:
Why just compiling a workbook into EXE is not enough?
https://www.xlspadlock.com/doc/topics/improve-protection-of-your-workbooks.htm

In your specific case, try to enable this feature:
https://www.xlspadlock.com/doc/topics/prevent-common-vba-and-ole-hacks.htm

I configurated the option. I put a password in the Excel file and I put it in xlspadlock option. When testing the option with a macro, the extracted workbook do not have even the password of the Excel file. Is there any especial feature to activate this option correctly in xlspadlock? I only providen a psw in the blanket apace of your program.

Did you enable “Do not allow loading/saving other workbooks”.?

It’s uncheck, is this option necesary to protect the workbook with a password?

I enable the option, but its no posible to save files or export to excel work book

So, it’s what you asked: be unable to use a VBA hack to save the protected workbook somewhere else. If you still want to make a save, it’s also possible with VBA API: Allow saving non encrypted workbooks

In previous version of xlspadlock, It was possible to establish a password. It was possible to set that password even with a botton at randon, but that botton does not appear in 2024.2.

Strange. Could you please take a screenshot of your XLS Padlock window? Maybe there is a glitch due to screen resolution.

The randon botton to assning a password does not appear, it is not visible xlspadlock 2024.2:

Anyway, if I type a pasword in the application, I already tried the option with different settings mentioned and it doesn’t work. Could you try or give me the exact steps to use this functionality of the pasword. Because if I implement a macro to save the compiled file, the pasword disappears and it is very easy to open the extracted workbook.

Indeed, there is a sizing problem. We’ll have to fix that in the next update on that screen.

In which field did you type your password? In the first one or the second one?

Because if I implement a macro to save the compiled file, the pasword disappears and it is very easy to open the extracted workbook.

I don’t understand why you don’t want to enable the XLS Padlock’s option that stops this. If you are worried about users saving your workbook themselves, just enable that option. With VBA SaveAs, it’s possible to save a workbook without password, even if the original workbook had one.
Thus, the XLS Padlock’s option lets you prevent this. Moreover, it’s possible to disable access to the Visual Basic editor so your user won’t be able to type their macro.

In the second space related for that option. In past versions it worked perfectly, I don understand why this option does not work anymore. This is the only question that I have, to know if this option still works

1 Like

We will investigate this issue too.