Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Code below works fine, but need to re-instate password after changes
are made. Sub SwitchView_n_protect2() ActiveSheet.Unprotect Password:="jeremy" With ActiveSheet.Range("f:f,g:g").EntireColumn .Hidden = Not .Hidden End With ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this:
Sub SwitchView_n_protect2() With ActiveSheet .Unprotect Password:="jeremy" With .Range("f:f,g:g").EntireColumn .Hidden = Not .Hidden End With .Protect DrawingObjects:=True, _ Contents:=True, _ Scenarios:=True, _ Password:="jeremy" End With End Sub -- jb "J.W. Aldridge" wrote: Code below works fine, but need to re-instate password after changes are made. Sub SwitchView_n_protect2() ActiveSheet.Unprotect Password:="jeremy" With ActiveSheet.Range("f:f,g:g").EntireColumn .Hidden = Not .Hidden End With ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect Workbook Vs Protect Sheet | New Users to Excel | |||
Can I protect columns w/in a "List" using Protect Sheet? | Excel Discussion (Misc queries) | |||
Lock and protect cells without protect the sheet | Excel Programming | |||
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet | Excel Programming | |||
how to protect a sheet | Excel Programming |