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

Is it possible to invoke
subroutines in another workbook if those
subroutines are not private?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Accessing VBA subroutines in another workbook



The called workbook (or addin) must be open.
(if it's referenced it will be opened automatically)


IF it's NOT referenced:

Run "MyFunctions.xla!sayhi"
Dim v
v = Run("MyFunctions.xla!doublethis", Range("a1"))

If you added a reference to that workbook in Tools/References
then you'd call it like any other procedure in the workbook.
(Note you have to rename the Project in the referenced workbook
so it wont conflict with the "calling" workbook's project name.

Assume the project in MyFunctions.xls is named prjFunctions

SayHi
of prjFunction.SayHi




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


" wrote:

Is it possible to invoke
subroutines in another workbook if those
subroutines are not private?



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
Accessing workbook info from a different workbook macro Brian Bowman[_3_] Excel Programming 0 September 20th 04 06:09 PM
Accessing workbook info from a different workbook macro Brian Bowman Excel Programming 2 September 16th 04 10:01 PM
Accessing information from second workbook randland Excel Programming 2 August 16th 04 11:29 PM
Finding out if subroutines exist in another workbook Erich Neuwirth Excel Programming 1 May 24th 04 08:35 AM
Accessing Closed Workbook Loomah Excel Programming 2 January 28th 04 12:11 PM


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

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"