Calling addin Function from another workbook?

T

thinkingfield

Hi, I wrote an addin that has several public functions. When I creat
another workbook I can call the functions perfecly within
spreadsheet. However, when I try to call the functions using VBA I ge
a 'function not defined'.

There should be a way to call a function using VBA from an addin jus
like calling any other excel function, is there special syntax fo
calling an addin function? Or, do I have to do something else to m
addin besides making the functions public?

BTW, I see the module in the project explorer. When I look into th
objects window I can see the functions when I highlight the addi
module, but NOT when I highlight the new workbook module.

Thanks
 
D

Dave Peterson

If you add a reference to your addin, you can call those functions just like
they're built into VBA.

First, give your addin's project a nice name:
alt-f11 to get to the VBE
ctrl-r to see the project explorer
select your addin/project
hit F4 to see the properties window.

Change the name from VBAProject to something unique and meaningful.

Then save that addin.

Then select your workbook's project
tools|references
select that project you just renamed.

Save your workbook.

===
If you don't want to use references, you can use:
application.run
to call the functions.
 

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

Top