Control of Serial Interface by VBA 
Author Message
 Control of Serial Interface by VBA


Hopefully somebody can explain how to control the serial
interface COM1 with an Excel VBA macro. Especially: how to
tell the PC to send 8 bit data and not 7 bit data?

I have a telephony directory in EXCEL and have written a
VBA-Macro with which I can instruct a modem to seize the
telephone line, dial the desired number and release the
line after some time (modem is connected in parallel to
the telephone).
The macro sends a string to COM1, e.g.:

Open "COM1" For Binary As 3
stri$ = "atd0w123456,,;h0" + Chr(13)
Put 3, , stri$

Problem herewith:
The PC sends (when requested by EXCEL macro) on COM1 in
the form Start + 7 bit + Stop (verified by oscilloscope),
but the modem requests the string in the form Start + 8
bit + Stop (I can't change this on my modem).
[If I send the same string with Microsoft Hyperterminal it
is sent with 8 bit and the modem works fine].

How can I instruct the PC to send with 8 bit?
The line
mode com1 12, n, 8, 1
in autoexec.bat does not help.
Start - Einstellungen - Systemsteuerung - System -
Ger?temanager - Anschlsse - COM1 - Anschlu?einstellungen -
 8 bit (in English somehow Start - Settings - System
control - System - Devicemanager - Connections - COM1 -
Settings - 8 bit) does not help either.

Operating system: Windows 98

Many thanks and best regards!

Fri, 12 Nov 2004 23:13:03 GMT  
 [ 1 post ] 

 Relevant Pages 

1. VBA interface to serial RS232 port

2. Serial Interface

3. REQ: Serial Port Interface

4. detecting non-working serial interface

5. serial interfacing

6. Universal Serial Bus interface programming


8. Need Serial CommPort interface code!!

9. Serial Port Interface

10. Anyone ever serial interfaced with a radio scanner?

11. Serial Interface

12. Serial port interfacing


Powered by phpBB® Forum Software