Call VBA procedure ilocated in another workbook
Hi - is there a way to call an Excel VBA procedure located in another
workbook? Thanks! |
Call VBA procedure ilocated in another workbook
Yes. BUT, the other workbook must also be opened in Excel for this to work.
Now, if the other workbook is not yet open, Excel will attempt to open it. If it doesn't find the workbook, you get an error message. If Excel does find the workbook and successfully opens it, the workbook_open or auto_open procedures will also execute. This will run the procedure named "Test" that's inside a module in Book1.xls Application.Run "Book1.xls!Test" This will run the procedure named "Test" that's inside Sheet1 of Book1.xls Application.Run "Book1.xls!Sheet1.Test" " wrote: Hi - is there a way to call an Excel VBA procedure located in another workbook? Thanks! |
All times are GMT +1. The time now is 03:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com