Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheets Protection for group!!!!?
Does anyone know if there is a way of protecting/unprotecting a group o
sheets in VBA? my current code selects all sheets when a cell i selected in a certain range, in XL XP the protect unprotect feature work fine, but i'm trying to use the workbook on a machine that has X 97 and this is where it falls down as it wont use the unprotec features of XP. Any ideas???? Simo -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheets Protection for group!!!!?
You have to do a sheet at a time.
-- Regards, Tom Ogilvy "Simon Lloyd " wrote in message ... Does anyone know if there is a way of protecting/unprotecting a group of sheets in VBA? my current code selects all sheets when a cell is selected in a certain range, in XL XP the protect unprotect features work fine, but i'm trying to use the workbook on a machine that has XL 97 and this is where it falls down as it wont use the unprotect features of XP. Any ideas???? Simon --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheets Protection for group!!!!?
Simon, here is a way to do all the sheets at once
Sub protect_sheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Protect Next ws End Sub you may also want to look here for a workaround for grouped sheets http://www.mcgimpsey.com/excel/prote...ed_sheets.html -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "Simon Lloyd " wrote in message ... Does anyone know if there is a way of protecting/unprotecting a group of sheets in VBA? my current code selects all sheets when a cell is selected in a certain range, in XL XP the protect unprotect features work fine, but i'm trying to use the workbook on a machine that has XL 97 and this is where it falls down as it wont use the unprotect features of XP. Any ideas???? Simon --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheets Protection for group!!!!?
here is a way to do all the sheets at once
maybe it is a matter of perspective, but I think most would agree you are doing each sheet individually within a loop. Same as what I suggested. Your link does the same - same as what I suggested. Just clarification for Simon since we were communicating outside the newsgroup. -- Regards, Tom Ogilvy "Paul B" wrote in message ... Simon, here is a way to do all the sheets at once Sub protect_sheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Protect Next ws End Sub you may also want to look here for a workaround for grouped sheets http://www.mcgimpsey.com/excel/prote...ed_sheets.html -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "Simon Lloyd " wrote in message ... Does anyone know if there is a way of protecting/unprotecting a group of sheets in VBA? my current code selects all sheets when a cell is selected in a certain range, in XL XP the protect unprotect features work fine, but i'm trying to use the workbook on a machine that has XL 97 and this is where it falls down as it wont use the unprotect features of XP. Any ideas???? Simon --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Ability to Group and Ungroup while in Protection Mode | Excel Discussion (Misc queries) | |||
Sheet protection and "Group and Outline" | Excel Discussion (Misc queries) | |||
please help . access group and outline with protection on | Excel Discussion (Misc queries) | |||
view group and outline with protection on | Excel Discussion (Misc queries) | |||
group box protection | Excel Discussion (Misc queries) |