Hello All,
I have a worksheet that has multiple options for us to highlight. I have recorded a macro to change the fill to black, bold the font and change it white. How Do i now change this code to work on any of the cells (all merged) I please.
Sub Black_Fill()
'
' Black_Fill Macro
'
'
Range("A10:G10").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
With Selection.Font
.Name = "Calibri"
.FontStyle = "Bold"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
End Sub
I will end up making a macro to revert back to original format once the option i need highlighted on my worksheet is no longer needed.
I would like to in the end add a cmd button to my context menu in the end.
Appreciate the assistance from you all!
-A
Bookmarks