PC Review


Reply
Thread Tools Rate Thread

Call VBA procedure ilocated in another workbook

 
 
oleg.melentyev@gmail.com
Guest
Posts: n/a
 
      26th Feb 2007
Hi - is there a way to call an Excel VBA procedure located in another
workbook? Thanks!

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VmVyZ2VsIEFkcmlhbm8=?=
Guest
Posts: n/a
 
      26th Feb 2007
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"






"(E-Mail Removed)" wrote:

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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call a sub procedure from another workbook jbronnum@gmail.com Microsoft Excel Programming 4 23rd Nov 2007 02:45 PM
Only Explicit Call of Procedure in another workbook??? =?Utf-8?B?a29oYWk=?= Microsoft Excel Programming 1 15th May 2007 05:51 PM
Call a procedure in the workbook from a worksheet =?Utf-8?B?U2VsaW5h?= Microsoft Excel Programming 3 21st Apr 2005 01:04 PM
REMOTE CALL PROCEDURE call (RPC) SERVICE Pete Q Windows XP Networking 2 23rd Nov 2003 03:34 PM
remote call procedure call failed Dave Warwick Windows XP Networking 0 5th Jul 2003 04:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:11 PM.