|
-
Dec 6th, 2019, 01:44 AM
#1
Thread Starter
New Member
How to send message using GSM from VB6
Private Sub Command1_Click()
On Error Resume Next
MSComm1.CommPort = 9
MSComm1.Settings = "9600,N,8,1"
MSComm1.Handshaking = comRTS
MSComm1.RTSEnable = True
MSComm1.DTREnable = True
MSComm1.RThreshold = 1
MSComm1.SThreshold = 1
MSComm1.InputMode = comInputModeText
MSComm1.InputLen = 0
MSComm1.PortOpen = True
MSComm1.Output = "AT" & vbCrLf
MSComm1.Output = "AT+CMGF=1" & vbCrLf
MSComm1.Output = "AT+CMGS=" '& Chr(34) & Trim(Text1.Text) & Chr(34) & vbCrLf
MSComm1.Output = Mid(Text2.Text, 1, 160) & Chr(26)
MSComm1.PortOpen = False
MsgBox "Successfully send Msg "
End Sub
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|