Hi All,
Im trying to send an sms with via trough an Siemens M20 Modem but i can't get it working. This is my code:
It won't send the sms....
Tantrazz
Im trying to send an sms with via trough an Siemens M20 Modem but i can't get it working. This is my code:
Code:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form_Load()
MSComm1.Settings = "9600,n,8,1" 'Change this with the Baud rate of your modem (The one you use with Hyper Terminal)
MSComm1.CommPort = 1 ' Change this with the port your Modem is attached
MSComm1.PortOpen = True
End Sub
Private Sub Command1_Click()
MSComm1.Output = "AT+CMGF=1" & Chr$(13) & Chr(10)
Sleep 500
MSComm1.Output = "AT+CMGS=+1212121112" & vbCrLf
Sleep 1000
Label1.Caption = MSComm1.Input
MSComm1.Output = "Hello This is my test message" & Chr(26)
Sleep 2000
If InStr(MSComm1.Input, "OK") Then
MsgBox "Message Send"
Else
MsgBox "Message Not Send"
End If
End Sub
Tantrazz