Cannot lock project
My bet is that you're opening a different file than you're saving.
Make sure that the addin's project is active before saving.
And as a workaround (I've never had the trouble you describe), you can change
the workbook's .addin property to false. (Select your project, hit F4 to see
properties and look for IsAddin.)
Then you can go back to excel and save that workbook as an addin (remember to
change the filetype) via that interface.
=====
Another way while in the VBE:
hit ctrl-g (to see the immediate window):
type this and hit enter:
workbooks("youraddinname.xla").save
Maybe this would help, too (also in the immediate window):
?workbooks("youraddinname.xla").fullname
(Just to verify that you're where you think you are.)
Peter T wrote:
In XL2K, after closing all module windows, I "lock project for viewing" and
password protect my addin. Save from the vbe, close XL.
When I reopen XL and my addin, the project is not locked.
I go back into Project properties / Protection and the lock check box and
password dialogs are empty. If I now tick the lock checkbox I'm asked for my
password (although no asterisks appear in the password textbox's). Enter
password, everything seems normal. Save, close, reopen and back to the same
situation.
The project is "clean" and correctly compiled.
Any ideas how to resolve without rebuilding the addin appreciated.
Regards,
Peter T
--
Dave Peterson
|