Prompt to Unprotect Single Worksheet

M

MiataDiablo

I've found lots of code to unprotect all worksheets in a workbook,
both with and without prompts for the password; however I can't seem
to locate anything for prompting a user to unprotect a single
worksheet in a workbook. Any guidance is greatly appreciated.
 
B

Bob Bridges

Seems to me the principle would be the same, wouldn't it? I hardly ever use
protection, but it looks from the documentation as though it applies to each
worksheet rather than to the workbook as a whole. So the examples you've
seen that apply to all worksheets in a workbook no doubt do something like a
For Each SheetObj In ActiveWorkbook.Worksheets, and then protect (or
unprotect) each SheetObj. So inside the loop it's doing exactly what you
want -- protect (or unprotect) a single sheet. What am I missing, here?
 
M

MiataDiablo

Seems to me the principle would be the same, wouldn't it?  I hardly ever use
protection, but it looks from the documentation as though it applies to each
worksheet rather than to the workbook as a whole.  So the examples you've
seen that apply to all worksheets in a workbook no doubt do something like a
For Each SheetObj In ActiveWorkbook.Worksheets, and then protect (or
unprotect) each SheetObj.  So inside the loop it's doing exactly what you
want -- protect (or unprotect) a single sheet.  What am I missing, here?





- Show quoted text -

Same principle but I don't know how to make the change from "For each"
and looping through all of 28 of them to only the one worksheet.
 

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

Top