ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel auto-start macro (https://www.excelbanter.com/excel-programming/312562-excel-auto-start-macro.html)

RDCLARK

Excel auto-start macro
 
How do you get a macro to automatically execute when you open a workbook?

Frank Kabel

Excel auto-start macro
 
Hi
tow ways:
1. Rename your macro to Auto_Open()
2. Put your code in the workbook_open() event

--
Regards
Frank Kabel
Frankfurt, Germany

"RDCLARK" schrieb im Newsbeitrag
...
How do you get a macro to automatically execute when you open a

workbook?


Paulw2k

Excel auto-start macro
 
Hi
Assuming you've got XL97 or above, double click on the ThisWorkbook object
(for the workbook concerned) in VBE project window to create a module. In
the module window select Workbook and Open from the drop-down lists. The
following
code will automatically be generated:

Private Sub Workbook_Open()

End Sub

Insert the code you want and save.

Regards

Paul





"RDCLARK" wrote in message
...
How do you get a macro to automatically execute when you open a workbook?




Tom Ogilvy

Excel auto-start macro
 
Use the workbook_Open event

see Chip Pearson's page on events

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"RDCLARK" wrote in message
...
How do you get a macro to automatically execute when you open a workbook?





All times are GMT +1. The time now is 07:31 AM.

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