Try If SerialPort1.IsOpen Then With SerialPort1 .Write("AT" & vbCrLf) .Write("AT+CMGF=1" & vbCrLf) .Write("AT+CMGS=" & Chr(34) & Label1.Text & Chr(34) & vbCrLf) .Write(RichTextBox1.Text & Chr(26)) 'Put some code in here to send the SMS Label3.Text = "sending SMS to " + Label1.Text End With Else MsgBox("Sorry ! there is some error in your computer port") End If Catch ex As Exception MsgBox(ex.Message) End Try
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)