LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Order of Excel Add-ins.

The code looks to see if the addin is in the list, and if it is not in the
list it adds it.

Then if it is not installed from the list it installs it.

So the code should work regardless of the state of the automation addin
(assuming it is registered).


--
Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com

wrote in message
oups.com...

Charles Williams wrote:
Assuming you really do have an Automation addin rather than some

other kind
of addin:

Basically, my c# add-in does not know that the VBA add-in exists.


Of course not, but its so easy: all it has to do is open it as if it

was a
workbook ...

****** The VBA addin checks whether the c# add-in is loaded - and

loads
it programmatically, if necessary.


something like this (not tested), where Myprojectname.classname is

the
ProgId of your Automation addin

dim oAddin as addin

on error resume next
set oaddin=nothing
set oaddin=addins("MyProjectname.classname")
on error goto 0
if oaddin is nothing then
addins.add("MyProjectname.classname")
set oaddin=addins("MyProjectname.classname")
endif

if not oaddin.installed then oaddin.installed=true


Thank you, Charles!!! This code works!

Could you explain some of the terminology? Assume that my automation
add-in is registered.

Am I correct that in order for (set
oaddin=addins("MyProjectname.classname")) to work it must already be in
the list of Add-ins but not necessarily "clicked in"?

And that "oaddin.installed=true" is equivalent to "clicking it in"?


And as a final question. If my automation add-in is clicked to be
loaded when Excel starts, but my VBA add-in with your wonderful code
beats Excel to the punch, will Excel try to load it afterwards anyway
and if so will it cause an error?

Once again, thank you so much.

Aaron Fude



Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com




 
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
How to change series plotting order without changing legend order? PatrickM Charts and Charting in Excel 6 December 2nd 09 07:43 PM
For chart syles, why doesn't color order match series order? AMiller Charts and Charting in Excel 1 October 29th 09 12:02 AM
How stop Excel file UK date order changing to US order in m.merge Roger Aldridge Excel Discussion (Misc queries) 1 October 9th 07 11:52 PM
purchase order counter in excel purchase order template Brandy@baoco Excel Worksheet Functions 0 February 23rd 05 06:17 PM
Daily Macro to Download Data, Order and paste in order Iarla Excel Programming 1 November 17th 04 11:55 AM


All times are GMT +1. The time now is 03:02 AM.

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"