View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jamie Collins Jamie Collins is offline
external usenet poster
 
Posts: 593
Default How to know whether it is using ADO ?


AA2e72E wrote:
If you use late binding, ADO simply needs to be present on oher

users' Pc
and your code will work. If you use early binding, the reference to

the same
object as on your machine must be possible


It may not be a simple as that but late binding would still be the way
to go e.g.

Sub test()
Dim oStream As Object

On Error Resume Next
Set oStream = CreateObject("ADODB.Stream")
On Error GoTo 0

If oStream Is Nothing Then
' User may only have ADO version 2.1
' so exit gracefully here.
End If

' Code continues ...

End Sub

Jamie.

--