Watch to Trap Protected Sheet (Repost)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am somehow protecting a sheet when I run some code. Can't figure out how I
am doing it. Can I set up a Watch to tell me when/how this is happening?

Thanks

P.S. There are only two sheets in the file.
 
If ActiveSheet.Protect = True
is protecting your worksheet.

I don't believe protect is a property. I'm not sure what the property is to
test for a protected sheet. ProtectContents can check to see if the contents
of a sheet are protected. Will that work for what you are doing? Otherwise,
best advice I can give you is to check VBA help on protection.
 
In looking through help, VBA has the following 3 properties pertaining to
worksheet protection. You could use any or all of these to test for whatever
protection you need to.

ProtectScenarios
ProtectDrawingObjects
ProtectContents
 
Hi ExcelMonkey,

A sheet can only be protected by explicitly invoking the protect method.

So, locate the line (or lines) in you code which contain the word 'protect'
(Edit | Find) and put a watch on the line(s).
 

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

Back
Top