Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am running a macro from an option button in a sheet
named "Summary". The macro make s various formatting changes, but it needs to unprotect the sheet first. I am running the following code, but the I get a run time error when it executes. Can any one help? Password = "Testpassword" Worksheets("Summary").Select Worksheets("Summary").Unprotect Password:=Password |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is a copy of a macro that I wrote...See if this helps
Sub unprotect_workbook_cc() Dim password password = InputBox("Please Enter Your Password!") If password = "3579" Then ActiveWorkbook.Unprotect password:="3579" Sheets("chris").Visible = True Else MsgBox "Incorrect Password, Please Enter Again.", vbExclamation End If End Sub -----Original Message----- I am running a macro from an option button in a sheet named "Summary". The macro make s various formatting changes, but it needs to unprotect the sheet first. I am running the following code, but the I get a run time error when it executes. Can any one help? Password = "Testpassword" Worksheets("Summary").Select Worksheets("Summary").Unprotect Password:=Password . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protecting/Unprotecting all sheets with macro leads to "image" iss | Excel Worksheet Functions | |||
Help w/ protecting all sheets | Excel Discussion (Misc queries) | |||
Protecting Macro and selected sheets | Excel Discussion (Misc queries) | |||
Protecting Sheets | Excel Worksheet Functions | |||
Protecting sheets | Excel Discussion (Misc queries) |