Description
A collection of all the Style objects in the specified or active workbook. Each Style object represents a range style description. The Style object contains all style attributes (font, number format, alignment, and so on) as properties. There are several built-in styles, including Normal, Currency, and Percent, which are listed in the Style Name box of the Style dialog box (Format menu).
Accessors
Use the Add method to create a new style and add it to the collection. The following example creates a new style based on the Normal style, modifies the border and font, and then applies the new style to cells A25:A30.
Dim newStyle as Style Set newStyle = ActiveWorkbook.Styles.Add(name:="bookman top border") newStyle.Borders(xlTop).LineStyle = xlDouble newStyle.Font.Bold = True newStyle.Font.Name = "bookman" Worksheets(1).Range("a25:a30").Style = "bookman top border"
Use the Styles method with an argument to access a single member of the collection or without an argument to access the entire collection at once.
Properties
Application Property, Count Property, Creator Property, Parent Property.
Methods
Add Method (Styles Collection), Item Method, Merge Method.