This is what you need to implement:
1.Check if regasm.exe exist as shown
command = Environ$("WINDIR") & "\Microsoft.NET\Framework\v4.0.30319\" & "regasm.exe"
If (Not FileExists(command)) Then
RegisterRegAsm = RegAsmEnum.NoFrameWorkInstalled
Exit Function
End If
2. Put a command together as shown
command = command & " /codebase "
command = command & Chr(34) & App.Path & "\yourfile.dll" & Chr(34) & " /tlb:yourfile.tlb"
3. Execute using shell command and check for return value as shown
res = Shell(command, 0)
if (res=0)then
end if