Calling Addin function?

B

Brian Shafer

Hello,
I created an addin for excel, work find when in the spreadsheet... but now I
want to be able to call my functions from within VBA? The addin is loaded?
How can I do this?
Thanks,
Brian

--
Please remove the 123 from the EMAIL Address. This has been added to prevent
spamming.


pssssst! Here spammer, spammer, spammer.
(e-mail address removed), (e-mail address removed), (e-mail address removed), (e-mail address removed)
 
N

Norman Harker

Hi Brian!

If you set a reference to it you can call it just like the function is
in the subject workbook.

Tools > References
Check against your Addin.
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
D

Dave Peterson

Just to add to Norman's post:

that Reference is under the Tools menu in the VBE (not excel itself).

And you'll want to change the name of the XLA's project (from the default
VBAProject).

While in the VBE, hit ctrl-R to show the project explorer. Then click on the
VBAProject (YourAddinName.XLA)

and hit F4 and rename the project in the (Name) box.

===
An alternative that you could use without setting a reference is to use
application.run.

Option Explicit
Sub testme()
Dim tempLong As Long
tempLong = Application.Run("personal.xla!myfunction", Range("a1:a10"))
End Sub

would be one example
 

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

Similar Threads

Web Page Search? 1
HTM, HTML, ASP 1
GuestBook Failure??? 1
PopUp from hyperlink 18
GuestBook 0
Drop Down Listbox Results 0
ActiveX Control 2
Access 2000 via web 2

Top