Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Calling Macros oustide current module

Here is the situation.
I have a "personal.xls" that loads a custom toolbar and
contains one of many frequently used macros.
I have another workbook with 6 frequently used macros that
is accessible publicly, department wide; we will call this
workbook "Stuff.xls".
I would like to call the macro "GL_Import" from the
toolbar that "Personal.xls" loaded.
I know that I can link the buttons directly to the macros
in the "Stuff.xls" workbook.
I could also copy the modules, forms, and such from
the"Stuff.xls" to "personal.xls" and have them linked
directly to the copy in my "personal.xls".
What I want to do is link the custom toolbar button to a
macro in "personal.xls" which opens "stuff.xls" then runs
the "GL_Import".
The answer is probably not nearly as difficult as I have
made it.
Thanks for you help in advance.
Mic

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Calling Macros oustide current module

Why is it you don't want to link directly to Stuff.xls. If you do, when the
button is pushed, Stuff.xls will be opened and the macro executed. I am
not sure of the advantage of going through personal.xls to get Stuff.xls
opened, unless you want Stuff.xls to be closed immediately after running the
macro - but if it is marked read-only, having it open shouldn't cause a
problem.

--
Regards,
Tom Ogilvy



"Mic" wrote in message
...
Here is the situation.
I have a "personal.xls" that loads a custom toolbar and
contains one of many frequently used macros.
I have another workbook with 6 frequently used macros that
is accessible publicly, department wide; we will call this
workbook "Stuff.xls".
I would like to call the macro "GL_Import" from the
toolbar that "Personal.xls" loaded.
I know that I can link the buttons directly to the macros
in the "Stuff.xls" workbook.
I could also copy the modules, forms, and such from
the"Stuff.xls" to "personal.xls" and have them linked
directly to the copy in my "personal.xls".
What I want to do is link the custom toolbar button to a
macro in "personal.xls" which opens "stuff.xls" then runs
the "GL_Import".
The answer is probably not nearly as difficult as I have
made it.
Thanks for you help in advance.
Mic



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Calling Macros oustide current module

Thank you.
As I said in my question, the answer was probably far
easier than I was making it out to be. I thought I had
tried to link to the "Stuff.xls" macro, apparently I had
not tried that before I made a few futile attempts at
writing some code to open the workbook and execute the
macro.
Again the KISS rule was overlooked.
Thanks again.
Mic

-----Original Message-----
Why is it you don't want to link directly to Stuff.xls.

If you do, when the
button is pushed, Stuff.xls will be opened and the macro

executed. I am
not sure of the advantage of going through personal.xls

to get Stuff.xls
opened, unless you want Stuff.xls to be closed

immediately after running the
macro - but if it is marked read-only, having it open

shouldn't cause a
problem.

--
Regards,
Tom Ogilvy



"Mic" wrote in message
...
Here is the situation.
I have a "personal.xls" that loads a custom toolbar and
contains one of many frequently used macros.
I have another workbook with 6 frequently used macros

that
is accessible publicly, department wide; we will call

this
workbook "Stuff.xls".
I would like to call the macro "GL_Import" from the
toolbar that "Personal.xls" loaded.
I know that I can link the buttons directly to the

macros
in the "Stuff.xls" workbook.
I could also copy the modules, forms, and such from
the"Stuff.xls" to "personal.xls" and have them linked
directly to the copy in my "personal.xls".
What I want to do is link the custom toolbar button to a
macro in "personal.xls" which opens "stuff.xls" then

runs
the "GL_Import".
The answer is probably not nearly as difficult as I have
made it.
Thanks for you help in advance.
Mic



.

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
CALLING MACROS FROM A NEW WORKSHEET NSNR Excel Discussion (Misc queries) 4 February 1st 08 07:10 AM
calling a module [email protected] Excel Discussion (Misc queries) 1 September 28th 07 04:03 PM
How to add formula calling up current workbook when sheet copied Smudge Excel Discussion (Misc queries) 6 September 7th 07 10:40 AM
Calling macros from another XL Workbook jamesa Excel Programming 1 October 2nd 03 03:06 PM
Close current Workbook after calling macro in other Des Janke Excel Programming 4 August 7th 03 07:33 AM


All times are GMT +1. The time now is 05:27 PM.

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"