|
-
Oct 21st, 2007, 04:33 PM
#1
Thread Starter
Junior Member
message when sending SMS
the code here is to send sms .my question is when i send the sms i need message in msgbox that the message is send
the code
For i = 0 To lstlist.ListCount - 1
MSComm1.Output = ("at+cmgf=1")
SleepEx 1000, False
MSComm1.Output = Chr(13)
SleepEx 1000, False
MSComm1.Output = ("at+cmgs=")
SleepEx 1000, False
MSComm1.Output = Chr(34)
SleepEx 1000, False
MSComm1.Output = lstlist.List(i)
SleepEx 1000, False
MSComm1.Output = Chr(34)
SleepEx 1000, False
MSComm1.Output = Chr(13)
SleepEx 1000, False
MSComm1.Output = txtmsg.Text
SleepEx 1000, False
MSComm1.Output = Chr(26)
Next i
thank's
-
Oct 21st, 2007, 07:54 PM
#2
Member
Re: message when sending SMS
You should put a code on MSComm event. Add this to the comevent,
Private Sub MSComm1_OnComm()
if MSComm1.commEvent = comEvReceive Then
'check if sent successfully
if instr(MSComm1.input,"CMGS") then
MsgBox("SMS sent")
end if
if instr(MSComm1.input,"CMS ERROR") then
MsgBox("SMS sending failed")
end if
MSComm1.inbuffercount = 0 'clear the buffer for next event
end if
end sub
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
|