Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Unprotect save worksheet and protect it again.
I need a macro to unprotect cells B6:O6 and protect them back.
I would appreciate your help . Thank Ken Calhoun |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Unprotect save worksheet and protect it again.
Activesheet.Unprotect Password:="ABC"
Range("B6:O6").Locked = False Activesheet.Protect Password:="ABC" Activesheet.Unprotect Password:="ABC" Range("B6:O6").Locked = True Activesheet.Protect Password:="ABC" -- Regards, Tom Ogilvy "holy41" wrote: I need a macro to unprotect cells B6:O6 and protect them back. I would appreciate your help . Thank Ken Calhoun |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Unprotect save worksheet and protect it again.
This should do exactly as you asked! Regards, Simon Sub Test() ActiveSheet.Unprotect Range("B6:O6").Select Selection.Locked = False Selection.FormulaHidden = False 'WHATEVER YOU WANT TO DO WITH THE CELLS HERE Range("B6:O6").Select Selection.Locked = True Selection.FormulaHidden = False ActiveSheet.Protect DrawingObjects:=True, Contents:=True Scenarios:=True ActiveWorkbook.Save End Su -- Simon Lloy ----------------------------------------------------------------------- Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670 View this thread: http://www.excelforum.com/showthread.php?threadid=56681 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protect/ unprotect worksheet | Excel Discussion (Misc queries) | |||
How do I unprotect a protected worksheet that has passwrod protect | Excel Discussion (Misc queries) | |||
protect/unprotect worksheet | Excel Programming | |||
Protect/Unprotect Worksheet | Excel Discussion (Misc queries) | |||
Excel VBA - Problems using Protect/Unprotect a worksheet | Excel Programming |