Solved Reference Comm Control 6.0 (1 Viewer)

zelarra821

Registered User.
Local time
Today, 08:58
Joined
Jan 14, 2019
Messages
813
Good afternoon. They have sent me a database to test a scale with an RS232 cable, which I already commented on here a week ago. The thing is, I need the Comm Control 6.0 reference, but I can't find it anywhere. It has to have the extension .dll, .olb or .tlb, but the one I download is .ocx. What I need for this function:

Code:
Private Sub peso_Enter()
mscomm2.commport = 2
mscomm2.settings = "9600,n,8,1"
mscomm2.inputlen = 0
mscomm2.portopen = True
mscomm2.output = "$" + Chr$(13)
Do
    DoEvents
Loop Until mscomm2.inbuffercount >= 11
entrada = mscomm2.input
peso = Mid(entrada, 3, 8) + " kg"

End Sub

Thank you.
 

Attachments

  • BC060.MDB
    356 KB · Views: 72

Ranman256

Well-known member
Local time
Today, 02:58
Joined
Apr 9, 2015
Messages
4,337
You can copy it from a PC that has it, then put it in the System32 folder, then register it.
regsvr32.exe myObj.ocx

then add it to the db registry: (Alt-F11), tools , references, browse to it
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 02:58
Joined
May 21, 2018
Messages
8,529
Maybe here
 

zelarra821

Registered User.
Local time
Today, 08:58
Joined
Jan 14, 2019
Messages
813
I downloaded it from that page, but when I later go to look for it in the VBA references, it doesn't find it because of the extension (I've said it before)
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 02:58
Joined
May 21, 2018
Messages
8,529
May be a silly question, but you did do this?
ocx.jpg
 

zelarra821

Registered User.
Local time
Today, 08:58
Joined
Jan 14, 2019
Messages
813
I already have done it and it works. It's solved. Thanks to all.
 

zelarra821

Registered User.
Local time
Today, 08:58
Joined
Jan 14, 2019
Messages
813
Hi guys. I can't get it to work right. I have loaded the reference via CMD and then added a record in the Windows registry. Finally, I inserted the reference in VBA as @MajP told me. However, when I enter the field, it gives me a 438 error, saying the property or object is not supported by the object. I'm not doing something right. I don't know if it's not the correct reference, or if I'm not installing it correctly.

I leave you a video so you can see the error, how I load the file in CMD and I show the file code for the Windows registry.

Please see if someone can help me. I need it to run a scale.

Thanks

 

zelarra821

Registered User.
Local time
Today, 08:58
Joined
Jan 14, 2019
Messages
813
Thank you so much. I've used it on my laptop, which has no COM port, and it does something. I have to go up to the store next week to try it out. I will keep you posted. All the best.
 

Users who are viewing this thread

Top Bottom