ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto run a macro (https://www.excelbanter.com/excel-programming/397814-auto-run-macro.html)

Jayjay

Auto run a macro
 
Hi,

Can anyone please tell me how to run a macro automatically from the
VB-editor when opening the spreadsheet ?

Br,
Jakob

Zone[_3_]

Auto run a macro
 
You can put this in the workbook module:

Private Sub Workbook_Open()
'your code here
End Sub

or you can put this in a standard module:

Sub Auto_open()
'your code here
End Sub

"Jayjay" wrote in message
...
Hi,

Can anyone please tell me how to run a macro automatically from the
VB-editor when opening the spreadsheet ?

Br,
Jakob





All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com