adamsm
02-09-2011, 08:01 AM
Hi,
I'm having the following code that colors the cell A1 when the macro is run.
How could I modify the code so that it would color any selected cell.
Any help on this will be kindly appreciated.
Thanks in advance.
Sub Selects()
Range("A1").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = vbYellow
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub
I'm having the following code that colors the cell A1 when the macro is run.
How could I modify the code so that it would color any selected cell.
Any help on this will be kindly appreciated.
Thanks in advance.
Sub Selects()
Range("A1").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = vbYellow
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub