Dear Sir/madam
How can I find whether DLL/Ocx is Registered or Not by given its Path.
As there can be many DLL of same name in the PC.
I need Code in VB6.
I have one code with me but not working. If you want just correct it.
'-------------------------------------------------------
Public Function IsRegistered(ByVal class As String) As Boolean
On Error Goto NotRegistered
Dim obj As Object
Set obj = CreateObject(class)
IsRegistered = True
Exit Function
NotRegistered:
End Function
'-------------------------------------------------------
Example Usage:
'-------------------------------------------------------
If Not IsRegistered("Excel.Application") Then
MsgBox "Excel is not installed/registered."
Else
MsgBox "Excel is installed & registered."
End If
'-------------------------------------------------------
Rahul
Thanks in Advance
Rahul