Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I design a speadsheet, I use color to designate cells
that are protected from cells that are not. While I prefer this method, others in the group would prefer a white background on all worksheets. Is there a way to write a macro which can toggle between both formats? In the past I have written a macro that can accomplish this goal, but required more lines of code since I did not know of a simple multiple line code that could accomplish the same. Any help would be appreciated. Thank You, JAD |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim bTurnOnColor as Boolean
Dim cell as Range ActiveSheet.Unprotect bTurnOnColor = True for each cell in Activesheet.UsedRange if cell.locked then if bTurnOnColor then cell.Interior.ColorIndex = 5 else cell.Interior.ColorIndex = xlNone end if End if Next Activesheet.Protect -- Regards, Tom Ogilvy "JAD" wrote in message ... When I design a speadsheet, I use color to designate cells that are protected from cells that are not. While I prefer this method, others in the group would prefer a white background on all worksheets. Is there a way to write a macro which can toggle between both formats? In the past I have written a macro that can accomplish this goal, but required more lines of code since I did not know of a simple multiple line code that could accomplish the same. Any help would be appreciated. Thank You, JAD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Turning =E13 to =$E$13 | Excel Worksheet Functions | |||
keeps turning off | Excel Worksheet Functions | |||
Colored Tabs | Excel Discussion (Misc queries) | |||
Turning #N/A to a zero...?? | Excel Discussion (Misc queries) | |||
Cell right next to colored cells is automatically colored on entering a value | Excel Programming |