Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have the following 2 macros as buttons on a custom toobar to Shade or
Unshade cells. Sub Shade_Cell() ' ' Shade_Cell Macro ' ActiveSheet.unprotect Password:="paspas" With Selection.Interior .ColorIndex = 35 .Pattern = xlSolid ActiveSheet.Protect Password:="paspas", DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowInsertingRows:=False, AllowDeletingRows:=False End With End Sub Sub unshade() ' ' unshade Macro ActiveSheet.unprotect Password:="paspas" Selection.Interior.ColorIndex = xlNone ActiveSheet.Protect Password:="paspas", DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowInsertingRows:=False, AllowDeletingRows:=False End Sub Is there anyway to merge these two macros to one button on my custom toolbar. So if the range highlighted is already shaded this color (35) then unshade....if it has no shade then change it to 35. thanks in advance for any help. tami |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for shading | Excel Worksheet Functions | |||
Creating a Macro For Shading Rows - Or Should I Use Conditional Formatting? | Excel Worksheet Functions | |||
shading a rowwhen a time is entered but no shading when 0 is enter | Excel Worksheet Functions | |||
Shading cells with a Macro | Excel Discussion (Misc queries) | |||
Is there a formula, function or macro that accounts for shading of a cell or row? | Excel Discussion (Misc queries) |