Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have a excel file and forgot the password Password Excel Discussion (Misc queries) 5 May 4th 13 10:30 AM
Excel file automatically opens Lost4Now Excel Discussion (Misc queries) 6 December 4th 05 09:35 PM
Remove or change password protected excel file Odawg Excel Discussion (Misc queries) 2 October 26th 05 03:54 AM
password protection of an MHTML Excel file blcarter22 Excel Discussion (Misc queries) 0 April 14th 05 05:15 PM
How Do I open an excel file without Excel Viewer support CocoriteBallGiants Excel Discussion (Misc queries) 2 February 4th 05 10:50 PM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"