ExcelBanter

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

George Davis

Auto macro
 
Dear people,
Can someone tell me how to get a macro to run uponj opening an excel file?
Thanks,
George




Dave Peterson

Auto macro
 
Name it Auto_Open() and put it in a General module.

George Davis wrote:

Dear people,
Can someone tell me how to get a macro to run uponj opening an excel file?
Thanks,
George


--

Dave Peterson

Norman Jones

Auto macro
 
Hi George,

Call the macro from the workbook's open event, e.g:

'===========
Private Sub Workbook_Open
Call myMacro
End Sub
'<<===========

This code should be placed in the workbook's ThisWorkbook module - not in a
standard module and not in a sheet module.

Alternatively, name the macro Auto_Open and place it in a standard module.


For mor information on event procedures, see Chip Pearson atL

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


---
Regards,
Norman



"George Davis" wrote in message
link.net...
Dear people,
Can someone tell me how to get a macro to run uponj opening an excel
file?
Thanks,
George







All times are GMT +1. The time now is 09:03 PM.

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