As long as you know at least one ProgID, you can do this:
Private Type CLSID '// GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
'// Possible errors
Private Const E_INVALIDARG As Long = &H80070057
Private Const E_UNEXPECTED As Long = &H8000FFFF
Private Const CO_E_CLASSSTRING As Long = &H800401F3
Private Const E_OUTOFMEMORY As Long = &H8007000E
Private Const REGDB_E_WRITEREGDB As Long = &H80040151
Private Declare Function CLSIDFromProgID Lib "ole32" (ByVal lpszProgID As
String, pclsid As CLSID) As Long
'
'
'
Private Function IsProgIDRegistered(ByVal strProgID As String) As Boolean
'// a ProgID goes something like this: "MSComctlLib.Slider". Passing a
'// bogus value or a non-registered class will return FALSE
Dim pclsid As CLSID
Dim hResult As Long
On Error Resume Next
hResult = CLSIDFromProgID(StrConv(strProgID, vbUnicode), pclsid)
IsProgIDRegistered = (hResult = 0)
End Function
And then call it like so:
Private Sub Form_Load()
Debug.Print IsProgIDRegistered("ADODB.Recordset")
Debug.Print IsProgIDRegistered("Some.BogusProgid")
Debug.Print IsProgIDRegistered("MSXML2.DOMDocument")
End Sub

Signature
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/
Please post/reply to the newsgroup(s)
> hello there
>
[quoted text clipped - 4 lines]
> Thanks in advance
> PRashantha