VB code to make Excel open in a specific worksheet

  • Thread starter Thread starter OscarC
  • Start date Start date
O

OscarC

Hello,

Just a quick one. Does anyone know what the VB code is to make Excel
open a workbook with a specific worksheet selected?


thanks,

Michael
 
Hi
you could put the following code in the workbook_open event of this
file:

sub workbook_open()
me.worksheets("sheet2").activate
end sub
 
Michael,

In the target workbook, add this code to the ThisWorkbook code module

Private Sub Workbook_Open()
Thisworkbook.Worksheets("Sheet3").Activate
End Sub

change the Sheet3 to your name

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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