VBATrain.com
Chapter 1 The Visual Basic Editor Page 6 of 11

   VBATrain Home    |    Sample Lessons Index    |   Previous Page    |   Next Page


Referring to Worksheets with Code

In the following Flash Exercise, you will learn:
  • Worksheets have two names: a code object Name, and the more visible sheet Name.
  • You can view and change these names in the VB Editor.
  • How to refer to worksheets using either the object name or the sheet name.
  • One way to run VBA procedures.

FLASH EXERCISE:
  1. Open your VB Editor with a blank code module.
  2. Follow the directions in the following Flash video, and write two code blocks that activate a worksheet.
              Activate worksheets with code


What is this "Sub...End Sub"?

In the preceding Flash Exercise, you wrote two VBA procedures. Each procedure was bracketed by a Sub and an End Sub statement. Code structure and basic code blocks are explained in the Chapter 2, Code Blocks. You can click on the preceding link to see more explanation about code blocks. Just use the back button on your browser to return to this lesson.


   VBATrain Home    |    Sample Lessons Index    |   Previous Page    |   Next Page

Click here for feedback and questions about this chapter.

Copyright © 2006-2008 J. Donald McClenagan, PhD, ALL RIGHTS RESERVED