ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prompt to Unprotect Single Worksheet (https://www.excelbanter.com/excel-programming/417042-prompt-unprotect-single-worksheet.html)

[email protected]

Prompt to Unprotect Single Worksheet
 
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.


Bob Bridges[_2_]

Prompt to Unprotect Single Worksheet
 
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?

--- " wrote:
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.


[email protected]

Prompt to Unprotect Single Worksheet
 
On Sep 14, 11:18*pm, Bob Bridges
wrote:
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?



--- " wrote:
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.- Hide quoted text -


- 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.


All times are GMT +1. The time now is 04:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com