General information
Title:
Excel Automation and Styles.
I have the following Code in a procedure, what I am trying to do is set up a new style on a workbook object in excel.
I know that you can do this like so:
oExcel.oWorkBook.Styles.Add "Bold"
oExcel.oWorkBook.Styles("Bold").Font.Size = 12
But when trying to the same with the following code, I get the following message:
object does not support this property or method.
Any Ideas....
With m_oWorkBook
If llAdd Then
.Styles.Add (strStyle)
End If
lcComm = "Styles(" & Chr(34) & strStyle & Chr(34) & ")." & strProperty
CallByName m_oWorkBook, lcComm, VbLet, vValue
End With
The strStyle, strProperty and vValue are parameters.
Thanks in advance.
Simon.
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only