Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
is there a way to pass word protect multiful worksheets within a workbook at
the same time. i have several workbooks that have 5-35 worksheets that all need pass word protected and would like to do it all at the same time. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This will do it
Sub Macro1() Dim strPassword As String Dim mySheet As Worksheet For Each mySheet In Worksheets strPassword = InputBox("Enter the password for the worksheet") mySheet.Protect Password:=strPassword, Scenarios:=True Next End Sub If you wish to use a single password Sub Macro1() Dim strPassword As String Dim mySheet As Worksheet strPassword = InputBox("Enter the password for the worksheet") For Each mySheet In Worksheets mySheet.Protect Password:=strPassword, Scenarios:=True Next End Sub Need hep with VBA? David McRitchie's site on "getting started" with VBA http://www.mvps.org/dmcritchie/excel/getstarted.htm Happy New Year -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "Terrie" wrote in message ... is there a way to pass word protect multiful worksheets within a workbook at the same time. i have several workbooks that have 5-35 worksheets that all need pass word protected and would like to do it all at the same time. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
multiple worksheets in workbook mail merged into a word documents | Excel Worksheet Functions | |||
protecting worksheets | Excel Discussion (Misc queries) | |||
Protecting all worksheets of a workbook | Excel Discussion (Misc queries) | |||
Forgot my pass word for excel sheet | Excel Worksheet Functions | |||
How do I my find pass word in excel | Setting up and Configuration of Excel |