Run Macro on sworkbook open

  • Thread starter Thread starter Ian
  • Start date Start date
Hi Ian
two ways:
1. In your workbook module (not in a standard module) use the
Workbook_Open() event procedure

2. Rename your macro to Auto_Open()
 
-----Original Message-----
HI,

How do I get a macro to run as soon as the workbook opens?

Thanks
Ian
.

Hi Ian,

The function I use is:

Private Sub Workbook_Open()

'main body of your macro

End Sub

I wouldnt be the worlds biggest VBA expert but as far as I
know this has to be contained inside the ThisWorkbook part
of the VBAProject

Hope that help,

John
 
big thanks to both of you ! Sorted!
-----Original Message-----


Hi Ian,

The function I use is:

Private Sub Workbook_Open()

'main body of your macro

End Sub

I wouldnt be the worlds biggest VBA expert but as far as I
know this has to be contained inside the ThisWorkbook part
of the VBAProject

Hope that help,

John

.
 
Back
Top