Calling Macros oustide current module

M

Mic

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
 
T

Tom Ogilvy

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.
 
G

Guest

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
 

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