I have the following code which programmatically adds a combobox to a worksheet.
This works fine, however, I want to be able to set the font color to Blue programmatically but I am not sure how to do this.
I can manually go into the properties of the combobox to change it so I am assuming there is also a way to do it with VBA.
I hope someone can offer me some advice.
Thanks.
VBA Code:
Set Cell = WSD.Range("J2")
WSD.OLEObjects.Add(ClassType:="Forms.ComboBox.1", link:=False, _
DisplayAsIcon:=False, Left:=Cell.Left - 5, Top:=Cell.Top + 3, Width:=Cell.Width + 125, Height:=Cell.Height).Name = "cboSTORESELECTION" & SheetName
With WSD.Shapes("cboSTORESELECTION" & SheetName).OLEFormat
.Object.LinkedCell = "$J$2"
.Object.ListFillRange = "CCStoreName"
End With
Set objOle = WSD.OLEObjects("cboSTORESELECTION" & SheetName)
objOle.Object.Font.Size = 13
objOle.Object.ListRows = 14
objOle.Object.SpecialEffect = 0 '"0 - fmSpecialEffectFlat"
Set objOle = Nothing
This works fine, however, I want to be able to set the font color to Blue programmatically but I am not sure how to do this.
I can manually go into the properties of the combobox to change it so I am assuming there is also a way to do it with VBA.
I hope someone can offer me some advice.
Thanks.