Macro Recorder

This is a simple, but practical way to get your feet wet learning Excel macros.  You can use them to build a clickable table of contents for your workbook, such as for a financial package.

The exercise is in first file, Index Builder.  The result is the Index Builder Result file, the second file listed.  Open up the exercise file. 

Index Builder Exercise

Index Builder Result

From the menu bar select:

The macro recorded is turned on and ready to record your work. Here is what you do to finish the recording:

Now let's see what you recorded. 

Here is the code you will see for SelectFirst

Sub SelectFirst()
'
' SelectFirst Macro
' Macro recorded 2/9/2003 by Jon Paul
'

'
    Sheets("First").Select
End Sub

The parts of the code are:

To test how the code runs, do this:

You should now be taken to the First sheet.

In part two of the lesson, we will show you how to duplicate this code and complete your table of contents.

 

Return To Excel Tips Index