Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling a procedure in a protected VBA Addin Project Chip Pearson Excel Programming 1 September 25th 04 03:47 PM
What workbook is calling the function Pierre Laporte Excel Programming 2 July 15th 04 04:53 PM
Calling a sub from a addin in vba Roger[_9_] Excel Programming 4 November 3rd 03 10:39 AM
Calling an Excel Addin from VBA ABN Excel Programming 2 July 31st 03 02:33 PM
Calling an Excel Addin from VBA ABN Excel Programming 0 July 31st 03 02:02 PM


All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"