ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can a macro be run on opening the file? (https://www.excelbanter.com/excel-discussion-misc-queries/133925-can-macro-run-opening-file.html)

Cortez

Can a macro be run on opening the file?
 
Does anyone know if you can create a macro that is initiated when the
file is opened? I have a number of users that will need to work with
an original (master) document. I want them to open the master file,
and have a macro save the file as a new unique spreadsheet. I know
how to do what I need from a macro, but I would like to have the macro
run without being keyed in by the user.

Any ideas?

Thanks,
TK


Dave Peterson

Can a macro be run on opening the file?
 
Put the macro in a General module (not under ThisWorkbook and not under a
worksheet).

Name it:
Sub Auto_Open()

It'll run each time excel opens the file--if the user allows macros to run.


Cortez wrote:

Does anyone know if you can create a macro that is initiated when the
file is opened? I have a number of users that will need to work with
an original (master) document. I want them to open the master file,
and have a macro save the file as a new unique spreadsheet. I know
how to do what I need from a macro, but I would like to have the macro
run without being keyed in by the user.

Any ideas?

Thanks,
TK


--

Dave Peterson

Lauren Giles

Can a macro be run on opening the file?
 
Yes! See the following Microsoft web page:
http://office.microsoft.com/en-us/ex...346281033.aspx

"Cortez" wrote:

Does anyone know if you can create a macro that is initiated when the
file is opened? I have a number of users that will need to work with
an original (master) document. I want them to open the master file,
and have a macro save the file as a new unique spreadsheet. I know
how to do what I need from a macro, but I would like to have the macro
run without being keyed in by the user.

Any ideas?

Thanks,
TK



Cortez

Can a macro be run on opening the file?
 
On Mar 8, 2:13 pm, Lauren Giles
wrote:
Yes! See the following Microsoft web page:http://office.microsoft.com/en-us/ex...346281033.aspx

"Cortez" wrote:
Does anyone know if you can create a macro that is initiated when the
file is opened? I have a number of users that will need to work with
an original (master) document. I want them to open the master file,
and have a macro save the file as a new unique spreadsheet. I know
how to do what I need from a macro, but I would like to have the macro
run without being keyed in by the user.


Any ideas?


Thanks,
TK



Thanks Lauren and Dave. Exactly what I needed.

TK



All times are GMT +1. The time now is 09:35 AM.

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