Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Call VBA procedure ilocated in another workbook

Hi - is there a way to call an Excel VBA procedure located in another
workbook? Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
procedure call BorisS Excel Programming 1 September 18th 06 07:16 AM
Call a procedure in the workbook from a worksheet Selina Excel Programming 3 April 21st 05 01:04 PM
Where else to look for procedure call Lulu Excel Programming 2 November 24th 04 02:14 AM
call procedure bob Excel Programming 1 August 9th 03 12:40 AM
procedure won't call John Gittins Excel Programming 0 August 5th 03 08:17 PM


All times are GMT +1. The time now is 07:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"