Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default Check for the Newest Available Library

Hello all! I was wondering if there was a way to programmatically get
a list of available reference libraries on the running computer and
then determine which library of a certain type is the newest, such as
the newest version of ADO?

Thank you!

Cory
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Check for the Newest Available Library

You would need to know the filenames and the current version of each
object library.

You could iterate through the collection like this:

For i = 1 To ThisWorkbook.VBProject.References.Count
MsgBox "Name: " & _
ThisWorkbook.VBProject.References.item(i).Name & vbCr & _
"Path: " & _
ThisWorkbook.VBProject.References.item(i).FullPath
Next i

You could use code like this to test out if a reference is available:

On Error Resume Next
' add a reference to MS Word 2003
ThisWorkbook.VBProject.References.AddFromFile _
("C:\Program Files\Microsoft Office\Office11\MSWORD.OLB")
On Error Goto 0
If Err = 0 Then
' your code continues
Else
MsgBox "MS Word 2003 not available on this computer"
End If

Each ADO library has a different filename so you could use the first
code to see if it is already installed. Then you can use the second
code to add it, if it isn't installed.

This is air code so test it first.

HTH,
JP

On Apr 7, 1:47*pm, "
wrote:
Hello all! *I was wondering if there was a way to programmatically get
a list of available reference libraries on the running computer and
then determine which library of a certain type is the newest, such as
the newest version of ADO?

Thank you!

Cory


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
setting up library check out KJP692 Excel Programming 3 June 18th 07 05:48 PM
How to check Solver and Forms 2.0 Object Library permanently? yoyo2000 Excel Discussion (Misc queries) 1 September 26th 05 03:04 AM
library check in and out bookworm Excel Discussion (Misc queries) 1 December 18th 04 12:45 AM
Reference Library - Missing Library in a lower version. luvgreen Excel Programming 1 October 7th 04 02:08 AM
SV: Check for newest *.txt file and import data ALK Excel Programming 0 April 2nd 04 10:16 AM


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