ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HELP: How to call UDF defined in another workbook? (https://www.excelbanter.com/excel-programming/402476-help-how-call-udf-defined-another-workbook.html)

[email protected]

HELP: How to call UDF defined in another workbook?
 
What is the syntax and/or requirements for calling a user-define
function defined in another workbook that is already open in the
current instance of Excel?

(That is, both workbooks are open in the same instance of Excel.)

Details....

I have Module1 in the workbook timeit.xls. A function therein
(myfunc) needs to call another function (foobar), which is declared in
Module1 in the workbook binary.xls. If I were calling "foobar" from
an Excel worksheet in timeit.xls, the syntax that works is:

binary.xls!foobar("arguments")

That syntax does not work in VBA.

My book simply says to click on ToolsReferences. I don't know what
to do after that.

If I browse the file system and double-click the xls file, I get an
error ("name conflicts with existing module").

If I close the workbook binary.xls, then repeat the ToolsReferences
procedure above, binary.xls is opened (added to the Project Explorer
list), but I still get the error "name conflicts with existing module".

[email protected]

HELP: How to call UDF defined in another workbook?
 
On Dec 9, 11:57 am, wrote:
What is the syntax and/or requirements for calling a user-define
function defined in another workbook that is already open in the
current instance of Excel?


Never mind! Dave Peterson already providing instructions to do this
in another thread. I will try those instructions first.


All times are GMT +1. The time now is 03:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com