Clear contents of unprotected cells in entire workbook with a macr
Dim sh as Worksheet
Dim sh1 as Worksheet
Dim rng as Range
Application.ScreenUpdating = False
set sh1 = ActiveSheet
set rng = selection
for each sh in ActiveWorkbook.worksheets
sh.Activate
' code to clear unprotected cells on the active sheet
Next
Sh1.Activate
rng.Select
Application.ScreenUpdating = True
--
Regards,
Tom Ogilvy
"FinnGirl" wrote in message
...
I am trying to write a macro that will clear the contents of all
unprotected
cells for an entire workbook. How would I do this without giving the
absolute cell reference for each of the unprotected cells I want to clear?
(I found samples of code that will clear unprotected cells on the active
worksheet only but haven't been able to figure out how to apply this to
all
sheet in the entire workbook.
--
Finn Girl
|