Chapter 3: Explore Workbooks and Worksheets


Chapter at a Glance

image from book

In this chapter, you will learn to:

  • Manipulate collections of workbooks and worksheets.

  • Manipulate individual workbook and worksheet items.

  • Use the Immediate window to execute individual statements.

Think back to your third-grade classroom. Your wooden frame desk, decorated with decades of crudely carved names, was fourth from the front, over in the last row next to the windows. Remember those big stairs down to the main floor, with that magnificent banister you would always watch for a chance to slide down? The main hallway was papered with drawings clustered around each classroom door. Each door led to a classroom, and each classroom was filled with kids.

A Microsoft Office Excel 2007 workbook is a lot like a school. The cells in a worksheet appear in rows and columns like students in a classroom. Worksheets are grouped into workbooks like classrooms in a school. And Excel can have several open workbooks, just as a city can have several schools. Just as you were able to move around freely in the rooms and halls of your old elementary school, you will soon be able to move around freely in Excel objects with your macros. Microsoft Visual Basic interacts with Excel by working with Excel objects. Everything in Excel that Visual Basic can control-workbooks, worksheets, cells, menus, text box controls-are objects. To control Excel from Visual Basic effectively, you must understand what objects are and how they work in Excel.

On The CD-Important 

Before you complete this chapter, you need to install the practice files from the book’s companion CD to their default locations. See “Using the Book’s CD” on page xv for more information.

BE SURE TO close any open workbooks. (To find any hidden workbooks, click Unhide on the View tab of the Ribbon.)

OPEN a clean, blank workbook. Restore the workbook window (not the Excel application window) so that it is not maximized. Then right-click the worksheet tab of Sheet1, and click View Code to open the Visual Basic editor.



Microsoft Office Excel 2007 Visual Basic for Applications Step by Step
Microsoft Excel 2002 Visual Basic for Applications Step by Step (Step by Step (Microsoft))
ISBN: 0735613591
EAN: 2147483647
Year: 2004
Pages: 99
Authors: Reed Jacobsen

Similar book on Amazon
Excel 2003 Power Programming with VBA (Book & CD-ROM)
Excel 2003 Power Programming with VBA (Book & CD-ROM)
Microsoftu00ae Office Excelu00ae 2007 Visual Basicu00ae for Applications Step by Step (BPG-step by Step)
Microsoftu00ae Office Excelu00ae 2007 Visual Basicu00ae for Applications Step by Step (BPG-step by Step)
Excel 2003 Formulas
Excel 2003 Formulas
Writing Excel Macros with VBA, 2nd Edition
Writing Excel Macros with VBA, 2nd Edition

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net