![]() |
Calling addin Function from another workbook?
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 -- thinkingfiel ----------------------------------------------------------------------- thinkingfield's Profile: http://www.excelforum.com/member.php...fo&userid=1618 View this thread: http://www.excelforum.com/showthread.php?threadid=27721 |
Calling addin Function from another workbook?
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. thinkingfield wrote: Hi, I wrote an addin that has several public functions. When I create another workbook I can call the functions perfecly within a spreadsheet. However, when I try to call the functions using VBA I get a 'function not defined'. There should be a way to call a function using VBA from an addin just like calling any other excel function, is there special syntax for calling an addin function? Or, do I have to do something else to my addin besides making the functions public? BTW, I see the module in the project explorer. When I look into the objects window I can see the functions when I highlight the addin module, but NOT when I highlight the new workbook module. Thanks. -- thinkingfield ------------------------------------------------------------------------ thinkingfield's Profile: http://www.excelforum.com/member.php...o&userid=16181 View this thread: http://www.excelforum.com/showthread...hreadid=277211 -- Dave Peterson |
All times are GMT +1. The time now is 09:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com