Refer to the part one file for the beginning of the lesson.
Index Builder Exercise
Index Builder Result
We created the code to select the First sheet. Before we copy the code, let's trim it down. To get to the code, select, Tools, Macro, Macros, then highlight, SelectFirst, and then click Edit.
Now trim the code from:
' SelectFirst Macro
' Macro recorded 2/9/2003 by Jon Paul
Since it is a small procedure (the name used to describe an individual program), the comment code automatically recorded by the Excel macro recorder is overkill.
Now let's build the code to select the other two sheets:
You have now created your second procedure, which should look like this:
Repeat the process to create the code to select the Third sheet.
Let's go over the code section of the procedure. It has two parts:
Now you have created the code for selecting each individual sheet.
Next we will show how to build the table of contents to complete the task
Return To Excel Tips Index