runiing makros on open

  • Thread starter Thread starter ET
  • Start date Start date
E

ET

I have a sheet with multiple tabs and always want to go to a specific tab on
opening the sheet. Is there a way of automatically running a makro when you
open the file

Thanks
 
Hi
one way: Just name your macro Auto_open. e.g.
SUB Auto_open()
msgbox "Workbook opened"
end sub

or put your code in the workbook_open event of your workbook module

HTH
Frank
 
ET,

Alternatively, add your code to the Workbook_Open event in ThisWorkbook code
module. The advantage of this is that this code automatically runs if you
open the workbook in VBA, Auto_Open doesn't.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top