Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello three years ago I wrote this simple vb script to reset a AIS:
Sub MyFunction()
Set MSComm1=CreateObject("MSCOMMLib.MSComm")
MSComm1.Settings = "38400,n,8,1"
MSComm1.CommPort = 1
MSComm1.InBufferCount = 0
MSComm1.PortOpen = True
If Err Then
MsgBox "COM" & MSComm1.CommPort & ": not opened, Sorry!"
Exit Sub
End If
MSComm1.Output="$PSRT,012,,,(--QuaRk--)*4B" & CHR(13)& "$PSRT,RDP*6F" & CHR(13)
MSComm1.PortOpen = False
Set MSComm1 = Nothing
End Sub
now i wanted to use it again and i get error ' ActiveX component cannot create object: MSCOMMLib.MSComm'
I cannot understand how to solve this !
if anybody can help... please! 🙂
It seemed that ActiveX isn't available on your machine or by your used tool and/or the libraries for the queried COM are missing or changed and/or that's not enabled within the security settings of your user-profile. I assume there were multiple changes on this in the last years ... If you could comprehend which changes happens it would be useful to search in the most likely direction.
https://en.wikipedia.org/wiki/ActiveX
- Marcus
Alex, I suspect Marcus is dead on with his summary of things, and I do not believe the ActiveX component is likely referring to our IE Plugin ActiveX control in this case given the code you provided, that is all OS level calls going on, so my hunch would be it is another ActiveX control you had installed at the time that you do not have installed currently... Hope this helps a bit more.
Regards,
Brett
I think you are right. The following may help to get nearer to the cause:
https://support.microsoft.com/en-us/help/139526/how-to-send-to-the-serial-port-by-using-mscomm32-ocx
https://www.experts-exchange.com/questions/24227138/MSCOMM.html
- Marcus