LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems with programatically referening libraries


I've used the below before...

...the main part for checking/unchecking is to use the .installed.

Function Load_XL_AddIn(strFilePath As String, strAddInName As String)
As Boolean
Dim addXL As Excel.addin

On Error Resume Next
strAddInName = Left(strAddInName, Len(strAddInName) - 4)

Set addXL = Excel.AddIns(strAddInName)
If Err < 0 Then
Err.Clear

Set addXL = Excel.AddIns.Add(strFilePath, 1)
If Err < 0 Then
Load_XL_AddIn = False
GoTo Load_XL_AddIn_End
End If

End If

If Not addXL.Installed Then addXL.Installed = True
Load_XL_AddIn = True

Load_XL_AddIn_End:
Exit Function
End Function


--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...fo&userid=3472
View this thread: http://www.excelforum.com/showthread...hreadid=542378

 
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
Reference Libraries and Add-Ins Rich Excel Discussion (Misc queries) 3 June 26th 09 10:13 PM
TOC referening a fixed cell Mitch Matheny[_2_] Excel Discussion (Misc queries) 2 April 28th 08 02:36 AM
Problems entering Data validation Programatically J Streger Excel Programming 3 April 1st 05 05:30 PM
Reference Libraries ben Excel Programming 9 March 23rd 05 10:24 PM
Porting VBA Libraries MWE[_42_] Excel Programming 1 May 9th 04 11:51 PM


All times are GMT +1. The time now is 02:25 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"