How to call a function from another workbook

J

Joe

Dear sir,
how can i call a function or procedure that contained in another workbook ?

thanks
Joe
 
A

Arvi Laanemets

Hi

When you want to use an UDF or procedure in several workbooks, then save it
into a module of Personal Macro Workbook (Personal.xls, it's created
automatically, when you select Personal Macro Workbook as destination to
save a newly-created macro, and later is loaded automatically whenever you
start Excel).
 
T

tjtjjtjt

One way:
You can also create a Reference between the two workbooks (if they are both
open) from the Tools Menu. To make the reference, both the files should be
open. After that, only the workbook you are using has to be open.

tj
 
C

Chip Pearson

After that, only the workbook you are using has to be open.

The workbook which is referenced must be open; Excel will
typically open it automatically for you.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
C

Chip Pearson

You can use Application.Run. E.g.,

Applicaiton.Run "Workbook1.xls!TheSub
' or
Result = Application.Run ("Workbook1!TheFunction,1,2,3)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Top