-
Highlight The Selected.
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.
[vba]Sub Selects()
Range("A1").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = vbYellow
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub[/vba]
Best Regards,
adamsm
-
[vba]Sub Selects()
With ActiveCell.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = vbYellow
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub[/vba]
-
Thanks for the help. I do really appreciate it.
Best Regards,
adamsm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules