Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I know if my active sheet is protected or not?
Message
Information générale
Forum:
Microsoft Office
Catégorie:
Excel
Divers
Thread ID:
01036607
Message ID:
01036658
Vues:
11
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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform