Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
changing background color
I am trying to change a background color of a cell.
I would like to do it with out "selecting" the cell. When I run record a macro I get the following: objRange.Font.in With Selection.Interior .ColorIndex = 36 .Pattern = xlSolid End With But is there any way to do it by: Set objRange = Range("C4") objRange.Font.Background ?????? thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
changing background color
Set objRange = Range("C4")
objRange.Interior.ColorIndex = 36 Gord Dibben MS Excel MVP On Fri, 28 Mar 2008 15:12:55 -0500, "greg" wrote: I am trying to change a background color of a cell. I would like to do it with out "selecting" the cell. When I run record a macro I get the following: objRange.Font.in With Selection.Interior .ColorIndex = 36 .Pattern = xlSolid End With But is there any way to do it by: Set objRange = Range("C4") objRange.Font.Background ?????? thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
changing background color
Greg
You should be able to do it without selecting anything with something like Range("c4").Interior.ColorIndex = 36 Range("c4").Interior.Pattern = xlSolid Good luck. Ken Norfolk, Va On Mar 28, 4:12*pm, "greg" wrote: I am trying to change a background color of a cell. I would like to do it with out "selecting" the cell. When I run record a macro I get the following: * * objRange.Font.in * * * * With Selection.Interior * * * * .ColorIndex = 36 * * * * .Pattern = xlSolid * * End With But is there any way to do it by: * * Set objRange = Range("C4") * * objRange.Font.Background ?????? thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
changing background color
thanks, I will take a look
"greg" wrote in message ... I am trying to change a background color of a cell. I would like to do it with out "selecting" the cell. When I run record a macro I get the following: objRange.Font.in With Selection.Interior .ColorIndex = 36 .Pattern = xlSolid End With But is there any way to do it by: Set objRange = Range("C4") objRange.Font.Background ?????? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
changing background color | Excel Discussion (Misc queries) | |||
changing cell background color | Excel Worksheet Functions | |||
Changing background color when changing value | Excel Programming | |||
Macro for Changing Cell Background Color | Excel Programming | |||
Changing Form Button Background Color | Excel Programming |