Page 66 - Excel Progamming Weekend Crash Course
P. 66
d540629 ch03.qxd 9/2/03 9:27 AM Page 41
Session 3 — The Excel Object Model 41
Name Property or Method Description
ReadOnly Property True if the workbook has been opened as
read-only
Saved Property True if the workbook has been saved since
the last change
Sheets Property Returns a Sheets collection, containing a
Sheet object for every worksheet and chart
sheet in the workbook
Worksheets Property Returns a Sheets collection, containing a
Sheet object for every worksheet in the
workbook
Activate Method Makes the workbook active
AddToFavorites Method Creates (in the Favorites folder) a shortcut
to the workbook
NewWindow Method Creates a new window
Post Method Posts the workbook to a public folder on a
Microsoft Exchange Server
PrintPreview Method Displays the workbook in the Print Preview
window
WebPagePreview Method Previews the workbook as it would appear
if saved as a Web page
The Worksheet Object
As mentioned earlier in this session, a worksheet is one of two types of sheets that a work-
book can contain (the other being a chart sheet). This section provides important informa-
tion on working with Worksheet objects.
Chart sheets are covered in Sessions 17 and 18.
Cross-Ref
Adding and Deleting Worksheets
To add a new, blank worksheet to a workbook, use the Worksheets collection’s Add method.
The syntax is:
WB.Add(Before, After, Count)