RegUnreg



' Register a type library


Sub RegisterTypeLib(ByVal TypeLibFile As String)
Dim TLI As New TLIApplication
'raises an error if unable to register

'(e.g. file not found or not a TLB)

TLI.TypeLibInfoFromFile(TypeLibFile).Register
End Sub

' Unregister a type library


Sub UnregisterTypeLib(ByVal TypeLibFile As String)
Dim TLI As New TLIApplication
'raises an error if unable to unregister

TLI.TypeLibInfoFromFile(TypeLibFile).UnRegister
End Sub



'function to call to register the ActiveX

Private Declare Function RegComCtl32 Lib "COMCTL32.OCX" _
Alias "DllRegisterServer" () As Long

function to call to unregister the ActiveX
Private Declare Function UnRegComCtl32 Lib "COMCTL32.OCX"
Alias "DllUnregisterServer" () As Long

Const ERROR_SUCCESS = &H0


(regunreg.html)- by Paolo Puglisi - Modifica del 25/3/2019