Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Can you unprotect a sheet within a Macro?
|
#2
![]() |
|||
|
|||
![]()
John, yes something like this
Sub test() ActiveSheet.Unprotect password:="123" 'change password here End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "John" wrote in message ... Can you unprotect a sheet within a Macro? |
#3
![]() |
|||
|
|||
![]()
Yes
Sub UnProtectSheet() PWD = "password" Worksheets("sheet1").Unprotect Password:=PWD End Sub Regards, Peo Sjoblom "John" wrote: Can you unprotect a sheet within a Macro? |
#4
![]() |
|||
|
|||
![]()
This unfortunately did not work. I am using two worksheets if that changes
anything. I have a space for a tax ID number, but in some cases you might use and Federal Tax ID number (FEIN) If i have the protection off, it changes the cell format, then takes that number and puts it in another cell in a different worksheet and changes the cell format again to FEIN, then takes you back to the original worksheet. However when you put the protection on, it wont work. "Peo Sjoblom" wrote: Yes Sub UnProtectSheet() PWD = "password" Worksheets("sheet1").Unprotect Password:=PWD End Sub Regards, Peo Sjoblom "John" wrote: Can you unprotect a sheet within a Macro? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with macro formula and variable | Excel Worksheet Functions | |||
Executing macro for all worksheet from a different worksheet | New Users to Excel | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
Macro Formula revision? | Excel Worksheet Functions | |||
Macro for multiple charts | Excel Worksheet Functions |