Microsoft Office Tutorials and References
In Depth Information
Figure 17-6. Example of the CustomView object
Figure 17-6. Example of the CustomView object
Now suppose we use the Autofilter command to filter on the year, as shown in Figure 17-7 .
Figure 17-7. A filtered view
The following code will give this custom view the name View1998 :
ThisWorkbook.CustomViews.Add "View1998"
Now we can display this view at any time with the code:
ThisWorkbook.CustomViews!View1998.Show
or:
strView = "View1998"
ActiveWorkbook.CustomViews(strView).Show
17.3.2 The Names Collection
As with the Application object, the Workbook object has a Names property that returns a Names
collection. This collection represents the Name objects associated with the workbook. For details
on Name objects, see Chapter 16 .
17.3.3 The Sheets Collection
The Sheets property returns a Sheets collection that contains a Worksheet object for each
worksheet and a Chart object for each chartsheet in the workbook. We will discuss Worksheet
objects and Chart objects later in the topic.
17.3.4 The Styles Collection and the Style Object
A Style object represents a set of formatting options for a range. Each workbook has a Styles
collection containing all Style objects for the workbook.
 
 
 
Search JabSto ::




Custom Search