Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello.
I have a Macro (VB script) that will help me protect all worksheets within a workbook. It prompts for the password to protect all sheets when the Macro is run. Can someone help me revise the code below where only 2 worksheets are protected out of a 3-worksheet workbook? Thank you! Sub Protect() Dim myPWD As String Dim wks As Worksheet myPWD = Application.InputBox("Enter Password: ") For Each wks In ActiveWorkbook.Worksheets wks.Protect Password:=myPWD Next wks End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help ! How do I do this in VB Script | Setting up and Configuration of Excel | |||
VB Script | Excel Programming | |||
vba script help | Excel Programming | |||
Help with VB script please? | Excel Programming | |||
Excel 2000/XP script to Excel97 script | Excel Programming |