I recorded a macro below and then tried to streamline the code but get a run time error "Invalid use of property
It would be appreciated if someone could kindly amend my code
Recorded Macro
Streamlined Macro
It would be appreciated if someone could kindly amend my code
Recorded Macro
Code:
Sub Macro3()
'
' Macro3 Macro
'
'
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 6299648
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End Sub
Streamlined Macro
Code:
Sub ColourScheme()
With Sheets("Imported Data")
With Range("H1")
.Interior
.Pattern = xlSolid
.Color = 6299648
.Font
.ThemeColor = xlThemeColorDark1
.Font.Bold = True
End With
End With
End Sub