Make Function Public

A

Andibevan

I have a User Defined Function in an add-in (XLA file created by myself).
What do I need to do in order to allow me to access it from code in another
project?

i.e.

The function is a Public Function located in the .xla file and is called
GetFolderName. I use it as follows:-

FolderName = GetFolderName("Title for GetFolderName")

But I get the error:-
"Sub or Function not defined"

What do I need to change in order to access a UDF stored in an XLA from a
seperate excel workbook?

Ta

Andy
 
T

Tom Ogilvy

I assume you mean use it in VBA. Then

either create a reference to the addin

or use application.Run to execute it.
 
A

Andibevan

If I then run the workbook (with the reference created) on a different PC
that also has the .xla installed will it work or do I have to setup the
reference on each PC?

I assume you mean use it in VBA. Then

either create a reference to the addin

or use application.Run to execute it.
 
T

Tom Ogilvy

If the addin is in the exact same path and has the same name, I don't think
you would need to recreate the reference.

If not, you would.
 

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