can we call a Sub in another opened vbaproject?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a workbook. Program copies one sheet and creates another workbook.
this second workbook need to use a Sub in the module of the parent book. Is
it possible? If it is, how?
Thanks
MVM
 
You can use Application.Run to do this. E.g,

Application.Run "Book1.xls!MacroName"


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

Application.Run "'another book2.xls'!test_msgbox"

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Tom, Chip, Bob that is a great help. Thank you

Bob Phillips said:
Use Application.Run

Application.Run "'another book2.xls'!test_msgbox"

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Back
Top