ExcelApplication Object Reference
CreateStyle Method
Syntax:
[VBScript]
Function CreateStyle() As SAStyle
Description:
Use CreateStyle to create a Style object.
The Style object represents a common style for a group of cells. To define a
style, first create a Style object, and assign values to any of its
properties.
For more information on creating formats and styles, see,
Adding Formatting.
Example:
[VBScript]
'--- Create a style.
Set mystyle = xlw.CreateStyle
mystyle.Font.Name = "Arial"
mystyle.Font.Bold = True
'--- Assign the style to a cell.
ws.cells("A1").style = mystyle
Top
Copyright © 2005, SoftArtisans, Inc.