Locking project

J

jacob

Hi,
I have an addin which is locked. On a given command the
addin copies a custom worksheet to a new workbook. The
custom worksheet contains some code in the worksheet
object and this is no longer locked. I'd like it be
unavailable to the user, so how can I lock this new VBA
project programmatically?

any help appreciated.
 
T

Tom Ogilvy

Send keys is about the only way you could do it. There is no provision to
do this in Excel 2000 and earlier for sure.

Application.VBE.ActiveVBProject.Protection

will return the status, but it is read only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top