
how do I get VB to dial a phone
I am trying out how to make a phone dialer and can not figure out
why this code does not work...
Private Sub Command8_Click()
' Buffer to hold input string
Dim Instring As String
' Use COM2.
MSComm1.CommPort = 2
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True
' Send the attention command to the modem.
MSComm1.Output = "AT" + Chr$(13)
' Wait for data to come back to the serial port.
Do
DoEvents
Loop Until MSComm1.InBufferCount >= 2
' Read the "OK" response data in the serial port.
Instring = MSComm1.Input
' Close the serial port.
MSComm1.PortOpen = False
End Sub