Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sherazade
Contributor III
Contributor III

writing/Reading serial data from com port

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! 🙂

 

 

Labels (1)
3 Replies
marcus_sommer

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

Brett_Bleess
Former Employee
Former Employee

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

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.