ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Launch a VBA macro with opening a file (https://www.excelbanter.com/excel-programming/318367-launch-vba-macro-opening-file.html)

LOLO53

Launch a VBA macro with opening a file
 
Hi,

I knew the "autopen" function under Excel 97.

But how do the same so easily with Excel 2002 ?

How to know which version of Excel is running ?

What are the different ways to launch a VBA macro with opening a file
(Ex : "autopen" with Excel 97, XXXX with Excel 2002, etc.)

Many thanks for your anwers ...

Otto Moehrbach[_6_]

Launch a VBA macro with opening a file
 
There are two ways. One is to place the macro in a regular module and name
the macro "AutoOpen". The other is to use the Workbook_Open macro in the
workbook module.
To find the version of Excel you have, select Help with a worksheet on
the screen. Select "About Microsoft Excel" from the drop-down menu. HTH
Otto
"LOLO53" wrote in message
om...
Hi,

I knew the "autopen" function under Excel 97.

But how do the same so easily with Excel 2002 ?

How to know which version of Excel is running ?

What are the different ways to launch a VBA macro with opening a file
(Ex : "autopen" with Excel 97, XXXX with Excel 2002, etc.)

Many thanks for your anwers ...




Tom Ogilvy

Launch a VBA macro with opening a file
 
Auto_Open works with Excel 5 through and to the latest version (Excel 2003).

In xl97 and later you can use the workbook_Open event

see Chip Pearson's page on Events
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"LOLO53" wrote in message
om...
Hi,

I knew the "autopen" function under Excel 97.

But how do the same so easily with Excel 2002 ?

How to know which version of Excel is running ?

What are the different ways to launch a VBA macro with opening a file
(Ex : "autopen" with Excel 97, XXXX with Excel 2002, etc.)

Many thanks for your anwers ...





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

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