Results 1 to 7 of 7

Thread: How to send message using GSM from VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2019
    Posts
    14

    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

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,900

    Re: How to send message using GSM from VB6

    does that code have anything to do with GSM?
    do you have GSM modem?

    there have been many threads about sending text messages in this forum, most seem to use some web interface
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    New Member
    Join Date
    May 2012
    Location
    42.787034,-81.176367
    Posts
    9

    Re: How to send message using GSM from VB6

    The link below has VB6 SMS Source Samples;

    http://www.scampers.org/steve/sms/samples.htm

    Joe

  4. #4
    Hyperactive Member
    Join Date
    Jan 2015
    Posts
    360

    Re: How to send message using GSM from VB6

    Try this : https://sindhitutorials.com/blog/gsm...s-android-app/

    Seems very promising, tested in a few minutes seems working

  5. #5
    Frenzied Member
    Join Date
    Dec 2008
    Location
    Melbourne Australia
    Posts
    1,325

    Re: How to send message using GSM from VB6

    In Australia ALL new smart phones use 4G (aka LTE I think).
    Australia still has 3G, and phones can revert to that (EG when I call my friend, both of our phones revert to 3G whilst we are on the call)

    I just googled, and still could not find an answer to this question -
    Is 4G GSM ?

  6. #6

    Thread Starter
    New Member
    Join Date
    Oct 2019
    Posts
    14

    Re: How to send message using GSM from VB6

    Quote Originally Posted by westconn1 View Post
    does that code have anything to do with GSM?
    do you have GSM modem?

    there have been many threads about sending text messages in this forum, most seem to use some web interface
    it is SIM300Z GSM MODULE

  7. #7

    Thread Starter
    New Member
    Join Date
    Oct 2019
    Posts
    14

    Re: How to send message using GSM from VB6

    Quote Originally Posted by westconn1 View Post
    does that code have anything to do with GSM?
    do you have GSM modem?

    there have been many threads about sending text messages in this forum, most seem to use some web interface
    it is SIM300Z GSM MODULE

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
  •  



Click Here to Expand Forum to Full Width