Issuing macro in workbook from separate workbook

G

Guest

Hi,
Can a macro be issued from another macro in another workbook?
i have a macro which copies cell contents, opens another workbook and looks
in range for a matching number. i can get as far as using one macro to copy
the selection and open the workbook, and another macro to select the sheet
required, match the number and paste the contents. However, i cannot issue
the other workbook macro from my button. i need to be able to start the other
macro with a command or correct input to start it.
my thought was
[personal.xls]workcell ( but this doesn't work )

Kind Regards,

Nigel
 
B

Bob Phillips

Nigel,

Try something like


Application.Run "myBook.xls!myMacro()"

or if it has an arguement

Application.Run "myBook.xls!myMacro", "hello you"
 

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