Can a macro be run on opening the file?

C

Cortez

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
 
D

Dave Peterson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top