Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Order of Excel Addin

Hi,

This is basically a follow up question to Charles Williams.

Charles, you posted this very nice code to help my VBA addin assure
that the C# addin that it depends on is loaded first.

dim oAddin as addin


on error resume next
set oaddin=nothing
set oaddin=addins("MyProjectname.c*lassname")
on error goto 0
if oaddin is nothing then
addins.add("MyProjectname.clas*sname")
set oaddin=addins("MyProjectname.c*lassname")
endif

if not oaddin.installed then oaddin.installed=true


And, in fact, the desired effect takes place if the C# addin is not
installed. But - the weirdest thing!!! - if I had previously quit Excel
with the automation addin "clicked in", then this code does not
accomplish its mission and the functions stored in the automation addin
are not available to the VBA add-in!

Any ideas on what might be going wrong?

Grateful,

Aaron Fude.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Order of Excel Addin

As it always happens, right after I post I find a workaround (but not a
solution). The following ugly hack fixes the problem:


' If Not oAddin.Installed Then oAddin.Installed = True
oAddin.Installed = False
oAddin.Installed = True

Still, I would like to hear your opinion on what is going on!

Aaron Fude

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
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
Excel C# AddIn Stephen Bullen[_3_] Excel Programming 0 June 24th 04 01:08 AM
Excel Addin help!!! Carl Excel Programming 0 January 5th 04 04:38 PM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM
Excel COM Addin vik Excel Programming 0 November 4th 03 10:19 PM


All times are GMT +1. The time now is 09:46 AM.

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

About Us

"It's about Microsoft Excel"