ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Locking project (https://www.excelbanter.com/excel-programming/278578-locking-project.html)

jacob[_3_]

Locking project
 
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.

Tom Ogilvy

Locking project
 
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.

--
Regards,
Tom Ogilvy


"jacob" wrote in message
...
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.





All times are GMT +1. The time now is 01:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com