Macros, Tab Index & the Name Cell

  • Thread starter Thread starter Juan
  • Start date Start date
J

Juan

I recieved some excellent help on getting the Tab button to behave th
way I want. Now I was thinking about writing a macro that would selec
the name of the Tab sequence from the "Name Cell" and have it run eac
time I open that worksheet. Then I could write one for all 6 of m
worksheets. How would I write that out if my tab sequence is calle
"PurTAB" for the worksheet called "PURCHASE"?

I'm assuming that I would go to the VBA Editor and double-click on th
correct worksheet, but how would I tell it to run on the opening of th
worksheet? Thanks for any help provided
 
To make something happen when you open your workbook, you
want to use the Workbook_Open event, which needs to sit
in the ThisWorkbook code. To get into ThisWorkbook open
your VB editor, View - Object Browser - double click on
ThisWorkbook and you'll be in the right place. Start
with:

Private Sub Workbook_Open()

' write code here

End Sub
 
Back
Top