Code:Private Declare Function GetSystemDirectory Lib "Kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long Private Property Get systemdir$() Dim str As String * 256, length& length = GetSystemDirectory(str, 256&) systemdir = Left(str, length) End Property 'You shell RegSrv32.exe in system directory: Shell systemdir & "\Regsvr32.exe /s " & YouOCXpath





Reply With Quote