Styles Method

Applies To

Workbook Object.

Description

Accessor. Returns an object that represents a single style (a Style object, Syntax 1) or a collection of all the styles (a Styles object, Syntax 2) in the workbook. Read-only.

Syntax 1

object.Styles(index)

Syntax 2

object.Styles

object

Required. The Workbook object.

index

Required for Syntax 1. The name or number of the style to return.

Example

This example deletes the user-defined style "Stock Quote Style" from the active workbook.


ActiveWorkbook.Styles("Stock Quote Style").Delete