ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Make Function Public (https://www.excelbanter.com/excel-programming/333296-make-function-public.html)

Andibevan[_2_]

Make Function Public
 
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



Tom Ogilvy

Make Function Public
 
I assume you mean use it in VBA. Then

either create a reference to the addin

or use application.Run to execute it.

--
Regards,
Tom Ogilvy

"Andibevan" wrote in message
...
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





Andibevan[_2_]

Make Function Public
 
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?

"Tom Ogilvy" wrote in message
...
I assume you mean use it in VBA. Then

either create a reference to the addin

or use application.Run to execute it.

--
Regards,
Tom Ogilvy

"Andibevan" wrote in message
...
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






Tom Ogilvy

Make Function Public
 
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.

--
Regards,
Tom Ogilvy


"Andibevan" wrote in message
...
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?

"Tom Ogilvy" wrote in message
...
I assume you mean use it in VBA. Then

either create a reference to the addin

or use application.Run to execute it.

--
Regards,
Tom Ogilvy

"Andibevan" wrote in

message
...
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









All times are GMT +1. The time now is 09:38 AM.

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