Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Protect/Unprotect workbook
Hi,
My apologies if this is a repeat request, but I couldn't find any answers for my dilema. I can write the VB to protect the complete workbook, however I just want to protect 4 out of ten worksheets, despite that all worksheets are hidden for start bar 1 (Main). I was wondering if there is anyone there which could help me. Many Thanks in advance |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Protect/Unprotect workbook
Hi,
Your question is a bit confusing you mention bot protecting and hiding worksheets and I'm not sure which you want so here's a routine for each To hide named sheets Sub nn() ShtData = "Sheet1,Sheet2" 'add sheet names as required MySheet = Split(ShtData, ",") For x = 0 To UBound(MySheet) Sheets(MySheet(x)).Visible = False Next End Sub to protect bamed sheets Sub bb() ShtData = "Sheet1,Sheet2" 'add sheet names as required MySheet = Split(ShtData, ",") For x = 0 To UBound(MySheet) Sheets(MySheet(x)).Protect Password:="MyPass" Next End Sub Mike "Vitordf" wrote: Hi, My apologies if this is a repeat request, but I couldn't find any answers for my dilema. I can write the VB to protect the complete workbook, however I just want to protect 4 out of ten worksheets, despite that all worksheets are hidden for start bar 1 (Main). I was wondering if there is anyone there which could help me. Many Thanks in advance |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Protect/Unprotect workbook
Check your other post.
Vitordf wrote: Hi, My apologies if this is a repeat request, but I couldn't find any answers for my dilema. I can write the VB to protect the complete workbook, however I just want to protect 4 out of ten worksheets, despite that all worksheets are hidden for start bar 1 (Main). I was wondering if there is anyone there which could help me. Many Thanks in advance -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protect/unprotect ALL worksheets in workbook ? | Excel Discussion (Misc queries) | |||
Protect/unprotect a formula | Excel Worksheet Functions | |||
Protect, unprotect | Excel Discussion (Misc queries) | |||
Protect/unprotect all sheets at once? | New Users to Excel | |||
Macros for Protect/Unprotect all sheets in a workbook | Excel Discussion (Misc queries) |