Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I know if my active sheet is protected or not?
Message
 
To
28/07/2005 10:54:32
General information
Forum:
Microsoft Office
Category:
Excel
Miscellaneous
Thread ID:
01036607
Message ID:
01036658
Views:
10
Marc,

From VFP and with Automation, I use this:
if type([oExcel.commandbars("Protection").Controls("Protect Sheet...")]="O"
  .....
Do not know about the equivalent of VFP TYPE function in VBA, so in VBA you probably need to loop through all Controls and to check for existence of "protect sheet" or "unprotect sheet" names.


>I use the command ActiveSheet.UnProtect at the beginning of my code. But if the user does not enter the password, then the rest of the code is also executed. I would like to put a IF command line to stop the execution of the code... I wonder what is the property to know if my active sheet is protected or not?
Previous
Reply
Map
View

Click here to load this message in the networking platform