Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I clear contents in my workbook w/o loosing my formulas? | Excel Worksheet Functions | |||
Macro to clear contents of unprotected cells AND drop down boxes | Excel Discussion (Misc queries) | |||
clear contents cells of unprotected cells | Excel Programming | |||
How do I delete the contents of unprotected cells only? | Excel Discussion (Misc queries) | |||
Delete contents of unprotected cells in workbook | Excel Worksheet Functions |