ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   calling sub from another workbook (https://www.excelbanter.com/excel-programming/279536-calling-sub-another-workbook.html)

James[_9_]

calling sub from another workbook
 
I have a subroutine which opens a workbook. I want the
subroutine in the first workbbok to then go on and run a
subroutine in the second workbook that I've just opened.

How do I go about doing this?

Hope this is clear.

James

Ron de Bruin

calling sub from another workbook
 
Some notes on this from Chip Pearson

Application.Run "Book1.xls!MacroName"

Or, if the book name contains spaces, (watch the quotes)

Application.Run "'Book One.xls'!MacroName"



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"James" wrote in message ...
I have a subroutine which opens a workbook. I want the
subroutine in the first workbbok to then go on and run a
subroutine in the second workbook that I've just opened.

How do I go about doing this?

Hope this is clear.

James





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com