Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation and Styles.
Message
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Excel Automation and Styles.
Miscellaneous
Thread ID:
00516197
Message ID:
00516197
Views:
60
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
Map
View

Click here to load this message in the networking platform