Click to See Complete Forum and Search --> : COM1


Btang11111
February 22nd, 2000, 09:28 PM
Hi,

Why does'nt the the codes below work? It compiled and accepted input phone number..

A modem (with Tone Dial) was connected to COM1 but did not dial out??



Option explicit
Dim pNumber As String

Private Sub Form_Load()
pNumber = Inputbox("Number to dial:")
Open "COM1" For Output As 1
Print 1, "ATDT" & pNumber & Chr$(13)
Close 1
End sub

Cakkie
February 22nd, 2000, 11:40 PM
The thing that happend here is that you have written the text to a file, not to the modem. If you have added a comm object, set the commport property to 1, and use the portopen statement to open it.

Tom Cannaerts
slisse@planetinternet.be

The best way to escape a problem, is to solve it.