HELP: How to call UDF defined in another workbook?

  • Thread starter curiousgeorge408
  • Start date
C

curiousgeorge408

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 Tools>References. 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 Tools>References
procedure above, binary.xls is opened (added to the Project Explorer
list), but I still get the error "name conflicts with existing module".
 
C

curiousgeorge408

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top