Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try adding sh.unprotect to your For/Next loop.
-- HTH, Barb Reinhardt "belvy123" wrote: Hi All I have a macro that is listed below It will be used for security keep people from unauthorized use of my excel file Anyways. The macro listed below works gret. However I need to add additional code to have the macro unprotect each sheet before it can clear the cells as stated in the original macro. Is anyone able to help with the code needed to unprotect each sheet. Private Sub Workbook_Open() Sheets(1).Activate If Date Range("A1").Value Then For Each sh In Sheets sh.Cells.Clear Next ActiveWorkbook.Save End If End Sub Thanks -- cruchnin numbers |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
unprotect sheet macro | Excel Discussion (Misc queries) | |||
Code to protect/unprotect a sheet using a macro with password | Excel Discussion (Misc queries) | |||
the unprotect sheet is not highlighted | New Users to Excel | |||
how to Unprotect sheet | Excel Discussion (Misc queries) | |||
Macro to Unprotect sheet!? | Excel Worksheet Functions |