View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default AddIn functions in code?

One way is to add a reference to that addin to your workbook's project.

Make sure that the project name isn't VBAProject--make it a nice unique name.
Select your addin's project in the VBE, hit F4 to see the properties window and
change the (name) property.

Then select your workbook's project that will use that addin and
tools|references
and check that addin's project.

Then you can use your functions just like they're built into VBA.

You could also use something like:

dim res as variant
res = Application.Run("youraddinname.xla!yourfunction", parm1, parm2, parm3)

With no references.

Rbp9ad wrote:

Can I use functions from addIns in VBA code? I have custom functions as well
as some from Excel's addIns that I would like to use in a module. Is this
possible? (Also I am new to programming and I am trying to learn VBA from
the few examples in John Walkenbach's Excel 2003 Bible. Would his Excel VBA
book be a good start?)


--

Dave Peterson