Reputation: 9
I have been writing a macro to define a custom style and I cannot find what the following does:
ActiveWorkbook. styles.add.value
I thought it might allow me to set an initial value (like "x") in any cell that I use the style, but no such luck yet.
I understand that it would be MUCH easier to just import the style, but my computer is restricted by my employer.
Sub testasdfasdf()
With ActiveWorkbook.Styles.Add("05 - Highlight 2")
.IncludeNumber = False
.IncludeFont = True
.IncludeAlignment = False
.IncludeBorder = False
.IncludePatterns = True
.IncludeProtection = False
.IncludeNumber = False
.Interior.Color = True
.Interior.Color = RGB(0, 0, 0)
.Font.Color = RGB(255, 255, 255)
.WrapText = True
.value = True
/or I tried this
/. Value= "x"
End With
End Sub
Upvotes: 0
Views: 61