0

Hi everyOne..currently I m dOing my final yr project...I haf sOme cOdes attached..coz i realli don nOe how to continue...can anyone help mi...

Thanks!! The one is bold is where i got stuck..

Thanks alot!!!

Codes
Private Sub cmdSendMesg_Click()
' Set up the communications port
MSComm1.CommPort = 1 ' Com Port 1

' Set for 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"

' Tell the control to read entire buffer when Input is used
MSComm1.InputLen = 0

' Open the port
MSComm1.PortOpen = True

' Send an 'AT' command to the phone
MSComm1.Output = "AT" & Chr$(13)
' The phone will respond with an 'OK'

' Set up the phone for a text message
MSComm1.Output = "AT+CMGF=1" & Chr$(13)
' The phone will respond with an 'OK'

' new mesg indication automatically send to pc, and not saved new mesg to sim/phone memory
MSComm1.Output = "AT+CNMI=1,2,0,0,0 " & Chr$(13)

(THIS IS WHERE I AM STUCK; dont know what to write next..)


' Close the port
MSComm1.PortOpen = False

End Sub
Reply With Quote

3
Contributors
2
Replies
5
Views
10 Years
Discussion Span
Last Post by roeyco81
0

Hi.
Give this code from where u r stuck.

MSComm1.Input
Do
DoEvents
Buffer$ = Buffer$ & MSComm1.Input
Loop Until InStr(Buffer$, "OK" & vbCrLf)
' Read the "OK" response data in the serial port.
' Close the serial port.
MSComm1.PortOpen = False

Regards
Veena

0

No Success of adding these lines, Any one can help Finishing Yanz's code?
P L E A S E

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.