SetFocus on a different sheet in VBA

  • Thread starter Thread starter AaronC
  • Start date Start date
A

AaronC

In my workbook, I have 2 worksheets. Sheet2 contains the raw data.
Sheet1 is a summary level of the raw data containing many calculations,
formatting, etc.

I have VBA code that populates sheet2 with data from an external source
on the Workbook_Open event.

The last thing I want to do after populating the sheet is to set focus
(or activate?) a different worksheet, in this case, sheet1.

Can anyone tell me how to accompish this? I have searched Help till I'm
blue in the face and can't think any more possible keywords.

Any help is appreciated! Thanks!
 
One way:

Private Sub Workbook_Open()
'Load Sheet2
Me.Sheets("Sheet1").Activate
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