PC Review


Reply
Thread Tools Rate Thread

Calling Addin function?

 
 
Brian Shafer
Guest
Posts: n/a
 
      6th Jan 2004
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 Removed), (E-Mail Removed), (E-Mail Removed), (E-Mail Removed)



 
Reply With Quote
 
 
 
 
Norman Harker
Guest
Posts: n/a
 
      6th Jan 2004
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 Removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Brian Shafer" <(E-Mail Removed)> wrote in message
news:wFqKb.138945$VB2.521485@attbi_s51...
> 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 Removed), (E-Mail Removed), (E-Mail Removed),

(E-Mail Removed)
>
>
>



 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      6th Jan 2004
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



Norman Harker wrote:
>
> 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 Removed)
> Excel and Word Function Lists (Classifications, Syntax and Arguments)
> available free to good homes.
> "Brian Shafer" <(E-Mail Removed)> wrote in message
> news:wFqKb.138945$VB2.521485@attbi_s51...
> > 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 Removed), (E-Mail Removed), (E-Mail Removed),

> (E-Mail Removed)
> >
> >
> >


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling macro from a different addin =?Utf-8?B?TmF5YW4=?= Microsoft Excel Programming 2 3rd Aug 2007 08:50 PM
Addins - Calling an addin function from within VBA code =?Utf-8?B?R3V5IE5vcm1hbmRlYXU=?= Microsoft Excel Programming 1 20th Jun 2006 07:22 PM
AddIn - Calling functions from VBA =?Utf-8?B?R3JhaGFtQg==?= Microsoft Excel Discussion 3 3rd Oct 2005 05:20 PM
Calling addin Function from another workbook? thinkingfield Microsoft Excel Programming 1 11th Nov 2004 03:39 AM
Calling a sub from a addin in vba Roger Microsoft Excel Programming 4 3rd Nov 2003 10:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:14 PM.