Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a macro be run on opening the file? Cortez Excel Discussion (Misc queries) 0 March 8th 07 04:57 PM
Browsing/opening a file with a macro Chip Smith Excel Discussion (Misc queries) 1 April 5th 06 12:56 AM
Opening a file with a Macro Adam1 Chicago Excel Discussion (Misc queries) 2 February 28th 05 10:13 PM
macro error when opening any file psp Excel Discussion (Misc queries) 1 January 31st 05 04:33 PM
After deleting a macro, I still get the pop-up when opening file Anne Excel Worksheet Functions 2 December 8th 04 05:31 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"