C
Chris Hankin
Hello,
Could someone please advise on suitable VBA code that enables me to
select multiple cells in a worksheet (cells that are not necessarily
next to each other) so that I can format them in my code given below?
Sub FormatCellRedandWhite()
'
' Format Cell Red and White Macro
' Macro recorded 16/11/2006 by chris.hankin
' This macro will automatically format the cells background to a red
colour, and
' apply a white coloured font setting.
'
ActiveCell.Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End Sub
Any help would be greatly appreciated.
Kind regards,
Chris.
Live Long and Prosper
Could someone please advise on suitable VBA code that enables me to
select multiple cells in a worksheet (cells that are not necessarily
next to each other) so that I can format them in my code given below?
Sub FormatCellRedandWhite()
'
' Format Cell Red and White Macro
' Macro recorded 16/11/2006 by chris.hankin
' This macro will automatically format the cells background to a red
colour, and
' apply a white coloured font setting.
'
ActiveCell.Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End Sub
Any help would be greatly appreciated.
Kind regards,
Chris.
Live Long and Prosper