Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How do I Launch a Macro on a different sheet

I'm stuck on this one. Basically, I have one spreadsheet
that when it opens, it will automatically open another spreadsheet.
Then what I'd like to have happen is to have a macro run on that newly
opened spreadsheet.

Example: test.xls is opened and through OpenNew macro, another
spreadsheet called target.xls is opened. I then need a macro
Refresh_Data on target.xls to run.

I don't want to have anything written into target.xls to automatically
run Refresh_Data when the spreadsheet is opened however since other
people open and work with it. I need to have Target.xls opened and
the Refresh_Data macro run by having something written into text.xls.

Does that make sense? If there is an easier method than what I was
thinking of, please recommend.

Thanks in advance.

Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How do I Launch a Macro on a different sheet

Paul,

Use the Application.Run method. E.g.,

Application.Run "target.xls!Refresh_Data"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Pepe" wrote in message
om...
I'm stuck on this one. Basically, I have one spreadsheet
that when it opens, it will automatically open another

spreadsheet.
Then what I'd like to have happen is to have a macro run on

that newly
opened spreadsheet.

Example: test.xls is opened and through OpenNew macro, another
spreadsheet called target.xls is opened. I then need a macro
Refresh_Data on target.xls to run.

I don't want to have anything written into target.xls to

automatically
run Refresh_Data when the spreadsheet is opened however since

other
people open and work with it. I need to have Target.xls opened

and
the Refresh_Data macro run by having something written into

text.xls.

Does that make sense? If there is an easier method than what I

was
thinking of, please recommend.

Thanks in advance.

Paul



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
Auto Launch of Macro Daren Excel Discussion (Misc queries) 1 March 20th 07 08:10 PM
Macro to launch web page hutchie Excel Discussion (Misc queries) 2 May 17th 06 05:30 PM
Can you use an IF statement to launch a macro? ian123[_34_] Excel Programming 3 January 3rd 04 12:38 AM
auto-launch a MACRO? d-cubed Excel Programming 4 December 22nd 03 10:10 PM
Launch Macro in Access via Macro running in Excel??? dgrant Excel Programming 1 September 24th 03 01:38 PM


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

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

About Us

"It's about Microsoft Excel"