Reference functions in different VBAproject

fboehlandt

Active Member
Joined
Sep 9, 2008
Messages
334
Hi there,
quick question regarding custom functions in VBA. I have an add-in containing several functions that I would like to use in my current VBA project. The add-in has a unique name so I should be able to refer to it. How do I go about doing that? Thankx
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Set a reference to the add-in in your other project, then just call the functions.
 
Upvote 0
thanks for the reponse,
that is what I did but no luck there. Here my steps to retrace:
- open the module in my current project (simply named VBAproject) containing the function reference
- Go to Tools, References and then select the relevant project from the scrolldown menu. The project has a unique name VBAMatrix (the bracketed term and name of the actual add-in when using Excel is macro.xla)
- rerun the macro
Again, VBA does not recognize the function reference, although the reference appears directly underneath the module. I assume that one should be able to refer to the function as one would to any other in the same project(i.e. without the application.worksheetfunction prefix). If it helps:
- the functions are recognized in Excel
- the add-in opens automatically whenever I start Excel (hence it is never inactive)
- The relevant function is defined in an Option Private Module
Any ideas please?
 
Upvote 0

Forum statistics

Threads
1,214,617
Messages
6,120,541
Members
448,970
Latest member
kennimack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top