PC Review Forums Newsgroups Microsoft Excel Microsoft Excel Discussion AddIn - Calling functions from VBA

Reply

AddIn - Calling functions from VBA

 
Thread Tools Rate Thread
Old 03-10-2005, 05:31 PM   #1
=?Utf-8?B?R3JhaGFtQg==?=
Guest
 
Posts: n/a
Default AddIn - Calling functions from VBA


I've written an Addin, added it to the list of available addins and installed
it. I can use the functions within the AddIn within Excel worksheets. What
I would also like to be able to do is call the function from VBA. How can I
do this?

Thanks,

Graham
  Reply With Quote
Old 03-10-2005, 05:38 PM   #2
Bernie Deitrick
Guest
 
Posts: n/a
Default Re: AddIn - Calling functions from VBA

Graham,

Set a reference to your Add-in through the VBE, Tools, References....

HTH,
Bernie
MS Excel MVP


"GrahamB" <GrahamB@discussions.microsoft.com> wrote in message
news:148EDE4E-708B-4138-8944-A19591047B0D@microsoft.com...
> I've written an Addin, added it to the list of available addins and installed
> it. I can use the functions within the AddIn within Excel worksheets. What
> I would also like to be able to do is call the function from VBA. How can I
> do this?
>
> Thanks,
>
> Graham



  Reply With Quote
Old 03-10-2005, 05:59 PM   #3
=?Utf-8?B?R3JhaGFtQg==?=
Guest
 
Posts: n/a
Default Re: AddIn - Calling functions from VBA

Bernie,

Thanks for your note. I unfortunately get a error message "Name conflicts
with existing module, project or Object library". Any ideas what I have to
rename in my addin to prevent me referencing it?

Thanks Graham

"Bernie Deitrick" wrote:

> Graham,
>
> Set a reference to your Add-in through the VBE, Tools, References....
>
> HTH,
> Bernie
> MS Excel MVP
>
>
> "GrahamB" <GrahamB@discussions.microsoft.com> wrote in message
> news:148EDE4E-708B-4138-8944-A19591047B0D@microsoft.com...
> > I've written an Addin, added it to the list of available addins and installed
> > it. I can use the functions within the AddIn within Excel worksheets. What
> > I would also like to be able to do is call the function from VBA. How can I
> > do this?
> >
> > Thanks,
> >
> > Graham

>
>
>

  Reply With Quote
Old 03-10-2005, 06:20 PM   #4
Bernie Deitrick
Guest
 
Posts: n/a
Default Re: AddIn - Calling functions from VBA

Graham,

Excel does references by "Project name", which doesn't change even if the workbook name is changed.
The default is VBAProject, so you probably have a whole bunch of VBAProject's. To change the name
of your add-in, press F4 to open the properties window, select the add-in in the Explorer window,
and change VBAProject to something unique, like "MyVBAAddIn"

HTH,
Bernie
MS Excel MVP


"GrahamB" <GrahamB@discussions.microsoft.com> wrote in message
news:1852AF52-5330-4354-9A0F-31FBBB1544A1@microsoft.com...
> Bernie,
>
> Thanks for your note. I unfortunately get a error message "Name conflicts
> with existing module, project or Object library". Any ideas what I have to
> rename in my addin to prevent me referencing it?
>
> Thanks Graham
>
> "Bernie Deitrick" wrote:
>
>> Graham,
>>
>> Set a reference to your Add-in through the VBE, Tools, References....
>>
>> HTH,
>> Bernie
>> MS Excel MVP
>>
>>
>> "GrahamB" <GrahamB@discussions.microsoft.com> wrote in message
>> news:148EDE4E-708B-4138-8944-A19591047B0D@microsoft.com...
>> > I've written an Addin, added it to the list of available addins and installed
>> > it. I can use the functions within the AddIn within Excel worksheets. What
>> > I would also like to be able to do is call the function from VBA. How can I
>> > do this?
>> >
>> > Thanks,
>> >
>> > Graham

>>
>>
>>



  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off