ExcelBanter

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

JIM.H.[_2_]

run macro auto
 
Hi,
I have a excel file that keeps the macro recorded. Now
What I want to do each time I open another excel file,
that macro should be run automatically, how can I do this?
Thanks,
Jim.


Frank Kabel

run macro auto
 
Hi
either rename the macro to Auto_Open()
or put the code in the workbook event Workbook_open()

--
Regards
Frank Kabel
Frankfurt, Germany


JIM.H. wrote:
Hi,
I have a excel file that keeps the macro recorded. Now
What I want to do each time I open another excel file,
that macro should be run automatically, how can I do this?
Thanks,
Jim.


JIM.H.[_2_]

run macro auto
 
Hi Frank,
Thanks for the reply. Macro is not actually attaced to
the file I open. We have many excel files created by
another system daily in a folder and when users open any
of them we want to moodify the data and present it. Macro
that modifies the data is attached to a single excel
file. I created a macro icon that calles macro in the in
the macro excel file, it works but I want the macro in
the macro excel file be code once any of the excel file
is openned. Thes files do not have anything in the
workbook event side. Any idea?
Thanks,
Jim.

-----Original Message-----
Hi
either rename the macro to Auto_Open()
or put the code in the workbook event Workbook_open()

--
Regards
Frank Kabel
Frankfurt, Germany


JIM.H. wrote:
Hi,
I have a excel file that keeps the macro recorded. Now
What I want to do each time I open another excel file,
that macro should be run automatically, how can I do

this?
Thanks,
Jim.

.


Frank Kabel

run macro auto
 
Hi Jim
AFAIK you have to put this kind of code in the files which are opened.
Don't see a chance to use a generich conde in your master document.

--
Regards
Frank Kabel
Frankfurt, Germany


JIM.H. wrote:
Hi Frank,
Thanks for the reply. Macro is not actually attaced to
the file I open. We have many excel files created by
another system daily in a folder and when users open any
of them we want to moodify the data and present it. Macro
that modifies the data is attached to a single excel
file. I created a macro icon that calles macro in the in
the macro excel file, it works but I want the macro in
the macro excel file be code once any of the excel file
is openned. Thes files do not have anything in the
workbook event side. Any idea?
Thanks,
Jim.

-----Original Message-----
Hi
either rename the macro to Auto_Open()
or put the code in the workbook event Workbook_open()

--
Regards
Frank Kabel
Frankfurt, Germany


JIM.H. wrote:
Hi,
I have a excel file that keeps the macro recorded. Now
What I want to do each time I open another excel file,
that macro should be run automatically, how can I do this?
Thanks,
Jim.

.



Steve Garman

run macro auto
 
I think you can do this with an application event.

Take a look at
http://www.cpearson.com/excel/AppEvent.htm

JIM.H. wrote:
Hi Frank,
Thanks for the reply. Macro is not actually attaced to
the file I open. We have many excel files created by
another system daily in a folder and when users open any
of them we want to moodify the data and present it. Macro
that modifies the data is attached to a single excel
file. I created a macro icon that calles macro in the in
the macro excel file, it works but I want the macro in
the macro excel file be code once any of the excel file
is openned. Thes files do not have anything in the
workbook event side. Any idea?
Thanks,
Jim.


-----Original Message-----
Hi
either rename the macro to Auto_Open()
or put the code in the workbook event Workbook_open()

--
Regards
Frank Kabel
Frankfurt, Germany


JIM.H. wrote:

Hi,
I have a excel file that keeps the macro recorded. Now
What I want to do each time I open another excel file,
that macro should be run automatically, how can I do


this?

Thanks,
Jim.


.



--
Steve Garman


All times are GMT +1. The time now is 10:02 AM.

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