Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DW DW is offline
external usenet poster
 
Posts: 11
Default Problems with programatically referening libraries

Hi Damon,

I have attempted to use the references collection ... with little success!

I wanted to reference an Outlook Object library, depending on the version of
Outlook that was installed on the user's machine. I seached their harddrive
for the appropriate library, and then attempted to "tick" that reference
using the refs collection. This particular library was already in the
reference list (unchecked), and would not allow me to add another ref with
the same name!!!

Do you know of a way to check items (programatically) within the "references
Dialog?

cheers,
DW
  #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

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
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 10:44 PM.

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"