Switching to a tab in the worksheet

  • Thread starter Thread starter Alex Martinez
  • Start date Start date
A

Alex Martinez

Hi I am using Excel 2002, which there are 5 tabs (worksheets) in it and I
want to place a code when the user switches to the first tab (worksheet).
How do I do that? I just want to place a simply code to do a cell reference
automaticlly when the first tab (worksheet) is pressed.. Any tips will be
appreicated. Thank you in advance.
 
In the code behind the first worksheet use a Worksheet_Activate event.
replace the MsgBox with whatever you wish to do on the worksheet now it is
activated....

Private Sub Worksheet_Activate()
MsgBox "I'm Here!"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top