+ Reply to Thread
Results 1 to 12 of 12

sending sms from excel vba

Hybrid View

rodryg123 sending sms from excel vba 10-18-2020, 10:46 AM
mjr veverka Re: sending sms from excel vba 10-18-2020, 11:54 AM
rodryg123 Re: sending sms from excel vba 10-18-2020, 01:55 PM
rodryg123 Re: sending sms from excel vba 10-19-2020, 08:28 AM
nigelog Re: sending sms from excel vba 10-19-2020, 11:38 AM
rodryg123 Re: sending sms from excel vba 10-19-2020, 11:51 AM
nigelog Re: sending sms from excel vba 10-19-2020, 12:02 PM
rodryg123 Re: sending sms from excel vba 10-19-2020, 12:22 PM
nigelog Re: sending sms from excel vba 10-19-2020, 12:27 PM
rodryg123 Re: sending sms from excel vba 10-19-2020, 12:42 PM
rodryg123 Re: sending sms from excel vba 10-19-2020, 12:46 PM
stefano78 Re: sending sms from excel vba 01-02-2021, 11:03 AM
  1. #1
    Registered User
    Join Date
    10-01-2020
    Location
    cameroun
    MS-Off Ver
    office 2007
    Posts
    37

    sending sms from excel vba

    Hello. please I have the following situation which I ask for your help:
    I have a list which contains 3000 records (row).
    Column A contains the last and last names of the customers.
    Column B contains the telephone numbers
    Column C contains the customer's birthday.
    I want the following conditionality tree:
    The program at start-up browses the list, compares the current date with those entered in column C; in the event of a tie for example for Cx, this would mean that it is the customer's birthday. Then the program retrieves the information Ax (client name) and Cx (client name) so that it can be used in the automatic SMS sending system

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,271

    Re: sending sms from excel vba

    ... Saints of Lord !

    Excel is not for that !

    But ...

    1. You must have access to the SMS gateway on the website of some provider of such service (SMS via the website)
    ... and the configuration and operation from the excel-vba level can be quite unreliable for such "something"
    (the ISP provides information about the configuration of the "sms query")

    2. You can use an additional software, e.g. enter "SMSLibX excel" in aunt google
    Comment:
    (This "above text" is not an advertisement but an accidental convergence of letters resulting from increased solar radiation in Antarctica)

    3. You can use the API for this - but it is usually a paid service of a specialized ISP

    4. You can also use e.g. Samba => Debian (Gsm-Utils package) => Gsm modem configured for "/dev/ttyS0"
    (see and read in the documentation and e.g. 'https://en.wikipedia.org/wiki/Samba_(software)')

    Zusammenfassung:
    There are dozens of tools better than Excel for sending sms/text messages ...

  3. #3
    Registered User
    Join Date
    10-01-2020
    Location
    cameroun
    MS-Off Ver
    office 2007
    Posts
    37

    Re: sending sms from excel vba

    I already have access to a gateway and it works for other cases.
    I'm just asking that you help me build a condition tree based on the information I gave you

  4. #4
    Registered User
    Join Date
    10-01-2020
    Location
    cameroun
    MS-Off Ver
    office 2007
    Posts
    37

    Re: sending sms from excel vba

    here is the loop I tried, but it hangs at next i with the error message: next i without for.

    this condition should allow me to test only the day and the month to know if it is the anniversary because my range E is formatted at (dd.mmm.1900
    as mentioned above, the goal is to test line by line by line. If the condition is verified, send the message and continue the procedure until the last line.
    If the condition is not verified, skip the line and continue the procedure


    Dim Recipient As String
        Dim Message As String
        Dim i As Integer
        
        Dim rowname As String
        Dim rownumber As String
        Dim rowdateanniv As Double
        
        'Dim rowtimerdv, rownumber, rowdaterdv, x  As String
        
        'rowtimerdv = Worksheets("PLANNING").Range("I4").Text
        'rowprestardv = Worksheets("PLANNING").Range("H4").Text
        rowname = Worksheets("CLIENTS").Range("D35:D5000").Value
        rownumber = Worksheets("CLIENTS").Range("D35:D5000").Value
        rowdateanniv = Worksheets("CLIENTS").Range("E35:E5000").Value
        
        
        x = "237"
        Recipient = x & rownumber
               
               
               'If Now - Date > TimeSerial(9, 0, 0) Then
               For i = 35 To 5000
        
        If (Day(Worksheets("CLIENTS").Cells(i, 5).Value) = Day(Date) And Month(Worksheets("CLIENTS").Cells(i, 5).Value) = Month(Date)) Then
                
            Message = "Dear  " & rowname & ", we wish you a happy birthday and all the best for you."
            'Next i
             Else
             Exit Sub
             Next i
            End If
        End If

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: sending sms from excel vba

    try change to
        For i = 35 To 5000
            If (Day(Worksheets("CLIENTS").Cells(i, 5).Value) = Day(Date) And Month(Worksheets("CLIENTS").Cells(i, 5).Value) = Month(Date)) Then
                Message = "Dear  " & rowname & ", we wish you a happy birthday and all the best for you."
            Else
    '''''''Shouldn't have Exit Sub Here - Maybe Go To Statement         
            End If
        Next i
    Last edited by nigelog; 10-19-2020 at 11:49 AM.

  6. #6
    Registered User
    Join Date
    10-01-2020
    Location
    cameroun
    MS-Off Ver
    office 2007
    Posts
    37

    Re: sending sms from excel vba

    Thank you, it's blocked at this level line red

    Dim Recipient As String
        Dim Message As String
        Dim i As Integer
        
        Dim rowname As String
        Dim rownumber As String
        Dim rowdateanniv As Double
        
        'Dim rowtimerdv, rownumber, rowdaterdv, x  As String
        
        'rowtimerdv = Worksheets("PLANNING").Range("I4").Text
        'rowprestardv = Worksheets("PLANNING").Range("H4").Text
        rowname = Worksheets("CLIENTS").Range("C35:C5000").Value
        rownumber = Worksheets("CLIENTS").Range("D35:D5000").Value
        rowdateanniv = Worksheets("CLIENTS").Range("E35:E5000").Value
        
        
        x = "237"
        Recipient = x & rownumber
               
               
          If Now - Date > TimeSerial(9, 0, 0) Then
               For i = 35 To 5000
        
                    If (Day(Worksheets("CLIENTS").Cells(i, 5).Value) = Day(Date) And Month(Worksheets("CLIENTS").Cells(i, 5).Value) = Month(Date)) Then
                
            Message = "Dear  " & rowname & ", we wish you a happy birthday and all the best for you."
            'Next i
                    Else
                        Exit Sub
             
                    
        End If
        Next i
        End If

  7. #7
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: sending sms from excel vba

    You are declaring those ranges as string, probably should be arrays or single row values

    Looking closer should probably be offset values from the cells that satisfy the condition
    Last edited by nigelog; 10-19-2020 at 12:14 PM.

  8. #8
    Registered User
    Join Date
    10-01-2020
    Location
    cameroun
    MS-Off Ver
    office 2007
    Posts
    37

    Re: sending sms from excel vba

    column C contains the names, D the telephone numbers and E the birthdays.
    I want the program to go through this range E, when the anniversary date is equal to the current date, the program retrieves the name of the customers and stores in rowname, retrieves the phone number stored in rownumber, send the sms and continue processing to the end of the pile

  9. #9
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: sending sms from excel vba

    Dim Message as string
    Message = "Dear " & Worksheets("CLIENTS").Cells(i, 5).Offset(,-2).Value & " Happy birthday kid" 
    MsgBox Message
    those ranges in red are not used as far as I can see, comment them out

  10. #10
    Registered User
    Join Date
    10-01-2020
    Location
    cameroun
    MS-Off Ver
    office 2007
    Posts
    37

    Re: sending sms from excel vba

    Thank, but i also need the phone number to send the sms to the API

  11. #11
    Registered User
    Join Date
    10-01-2020
    Location
    cameroun
    MS-Off Ver
    office 2007
    Posts
    37

    Re: sending sms from excel vba

    Also I compare unique day and month to determine if it's customer's birthday because my column E date format is (dd.mmm.1900)

  12. #12
    Registered User
    Join Date
    04-03-2017
    Location
    italy
    MS-Off Ver
    2010
    Posts
    83

    Re: sending sms from excel vba

    Hello porucha vevrku
    Do you have experience of sending sms with the sms sending system with gsm phone indicated in point 4 of post n. 2?
    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 01-08-2016, 09:57 AM
  2. sending sms from excel?
    By Johnny247 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-12-2015, 10:10 PM
  3. Copying content of one excel to another excel and sending email with excel data
    By archies.gall in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2012, 02:22 PM
  4. Something out of the Purview of Excel-Sending Excel table as a body in an Email?
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-24-2011, 07:50 AM
  5. [SOLVED] Sending SMS from Excel
    By Piotr in forum Excel General
    Replies: 1
    Last Post: 11-03-2005, 06:00 AM
  6. Sending fax from Excel
    By Bogdan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2005, 11:05 AM
  7. Replies: 0
    Last Post: 04-02-2005, 09:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1