Calling Addin function?

  • Thread starter Thread starter Brian Shafer
  • Start date Start date
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)
 
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.
 
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
 
Back
Top