Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I protect all excel tabs in a file with one password entry?
I have no understanding of writing VB, but is it possilbe to write a macro
that will password protect all sheets in a workbook simultaneously with all of the following options checked (and all others cleared): "Select unlocked cells", "Format Rows"? Thanks in advance for any help on this issue. I can copy and paste if someone else can write the code. "Indiana born" wrote: I have spreadsheets with multiple tabs - I presently have to password protect each tab separately. I'm looking for a way to protect all tabs with one password entry. i am not share the files, but others do view them and I don't want changes made. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can I protect all excel tabs in a file with one password entry?
Sub ProtectAllSheets()
Application.ScreenUpdating = False Dim N As Single For N = 1 To Sheets.Count With Sheets(N) .Protect Password:="justme", AllowFormattingRows:=True .EnableSelection = xlUnlockedCells End With Next N Application.ScreenUpdating = True End Sub You might want to unprotect them all at some point......... Sub UnprotectAllSheets() Application.ScreenUpdating = False Dim N As Single For N = 1 To Sheets.Count Sheets(N).Unprotect Password:="justme" Next N Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On Wed, 29 Oct 2008 14:01:01 -0700, hollyc83 wrote: I have no understanding of writing VB, but is it possilbe to write a macro that will password protect all sheets in a workbook simultaneously with all of the following options checked (and all others cleared): "Select unlocked cells", "Format Rows"? Thanks in advance for any help on this issue. I can copy and paste if someone else can write the code. "Indiana born" wrote: I have spreadsheets with multiple tabs - I presently have to password protect each tab separately. I'm looking for a way to protect all tabs with one password entry. i am not share the files, but others do view them and I don't want changes made. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I have a excel file and forgot the password | Excel Discussion (Misc queries) | |||
Excel file automatically opens | Excel Discussion (Misc queries) | |||
Remove or change password protected excel file | Excel Discussion (Misc queries) | |||
password protection of an MHTML Excel file | Excel Discussion (Misc queries) | |||
How Do I open an excel file without Excel Viewer support | Excel Discussion (Misc queries) |