Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test for VBAProject Locked from Viewing
Is it possible to test from within my Excel program
as to whether the overall VBAProject is Locked from Viewing? (I would like to branch one way within the program for knowledgable, trustworthy users who have the unlocked version, but another way for regular users for whom the code is locked from viewing.) -- Dennis Eisen |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test for VBAProject Locked from Viewing
Dennis,
Try something like the following: If ThisWorkbook.VBProject.Protection = 0 Then Debug.Print "Not locked" Else Debug.Print "Locked" End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "DennisE" wrote in message ... Is it possible to test from within my Excel program as to whether the overall VBAProject is Locked from Viewing? (I would like to branch one way within the program for knowledgable, trustworthy users who have the unlocked version, but another way for regular users for whom the code is locked from viewing.) -- Dennis Eisen |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test for VBAProject Locked from Viewing
Chip,
Thanks so much for your help; my final version took the form If ThisWorkbook.VBProject.Protection _ = vbext_pp_locked Then [do this code for simpletons] Else [do this code for the cognesenti] End If (This requires early binding with vbe6ext.olb, but my program required it anyway.) -- Dennis Eisen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Viewing of protected locked or unlocked cells | Excel Worksheet Functions | |||
Viewing Formulas in Locked Cells | Excel Discussion (Misc queries) | |||
Is there any way of viewing the formula of a locked cell? | Excel Worksheet Functions | |||
Viewing LOCKED cells | Excel Discussion (Misc queries) | |||
Excel 2003 when closing Excel after having opened a project locked for viewing.. password prompt??? | Excel Discussion (Misc queries) |