hello
charudatt
i use this code for read the msg and serperate the msg...
Private Sub Command1_Click()
Dim buffer$
DIM newMsg As String, MSG As String
MSComm1.Output = "AT+CMGF=1" + Chr(13)
Do
DoEvents
buffer$ = buffer$ & MSComm1.Input
Loop Until InStr(buffer$, "OK")
Text1.Text = Text1.Text & vbCr & buffer$
buffer$ = ""
MSComm1.Output = "AT+CMGR=1" + Chr(13)
Do
DoEvents
buffer$ = buffer$ & MSComm1.Input
Loop Until InStr(buffer$, "OK")
Text1.Text = Text2.Text & vbCr & buffer$
Text2.Text = buffer$
buffer$ = ""
newMsg = Text2.Text
newMsg = Right(newMsg, Len(newMsg) - 51) 'SKIP 51 character
MSG = Left(newMsg, 100) 'NO 100 DEPEND YOUR MSG LENGTH,IF DONT KNOW U CAN PUT MORE THAN 100
newMsg = newMsg & "MESSAGE =" & MSG & vbCrLf
MSComm1.PortOpen = False
End Sub
Private Sub Form_Load()
MSComm1.CommPort = 1
MSComm1.Settings = "57600,n,8,1"
MSComm1.PortOpen = True
MSComm1.Handshaking = comNone
End Sub
i hope help u abit.
but i still problem for read incomming msg.. i still study now
Bookmarks