Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Does anyone have a macro for toggling workbook protection?
E.g., run the macro and it unprotects the workbook if it's in a protected state and vice versa. Thanks for any help given! |
#2
![]() |
|||
|
|||
![]()
try
Sub protectunprotecttoggle() If ActiveWorkbook.ProtectStructure = True Then ActiveWorkbook.Unprotect Password = "d" Else ActiveWorkbook.Protect structu=True, Windows:=False, Password:="d" End If End Sub -- Don Guillett SalesAid Software "Just Learning" wrote in message ... Does anyone have a macro for toggling workbook protection? E.g., run the macro and it unprotects the workbook if it's in a protected state and vice versa. Thanks for any help given! |
#3
![]() |
|||
|
|||
![]()
Thanks! It works great!
"Don Guillett" wrote: try Sub protectunprotecttoggle() If ActiveWorkbook.ProtectStructure = True Then ActiveWorkbook.Unprotect Password = "d" Else ActiveWorkbook.Protect structu=True, Windows:=False, Password:="d" End If End Sub -- Don Guillett SalesAid Software "Just Learning" wrote in message ... Does anyone have a macro for toggling workbook protection? E.g., run the macro and it unprotects the workbook if it's in a protected state and vice versa. Thanks for any help given! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Strange Personal Macro Workbook Behavior | Excel Discussion (Misc queries) | |||
macro for protection | Excel Discussion (Misc queries) | |||
Macro to link Sheets to main workbook | Excel Discussion (Misc queries) | |||
Macro working in "This Workbook", but not while in "Personal.xls" | Excel Worksheet Functions | |||
Run macro in new workbook | Excel Discussion (Misc queries) |