+ Reply to Thread
Results 1 to 12 of 12

sending sms from excel vba

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

    sending sms from excel vba

    Hi all.
    You will find attached a vba code for sending sms.
    it runs normally but does not deliver sms.
    Someone to help me figure out what is missing please






    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: sending sms from excel vba

    What are you trying to do with this line of code:

    Please Login or Register  to view this content.
    It is setting Recipient to the string "x&lastrownumber" which is probably not a valid recipient string. Is it supposed to getting a phone number from a cell? At first I thought you meant this:

    Please Login or Register  to view this content.
    but there is no variable lastrownumber. Could you possibly mean this?

    Please Login or Register  to view this content.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: sending sms from excel vba

    Also I don't believe this runs because this line does not compile:

    Please Login or Register  to view this content.
    Do you mean this?

    Please Login or Register  to view this content.

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

    Re: sending sms from excel vba

    Thank for your reply

    I retrieve the telephone number in the "lastrownumber" cell then concatenate it with the code of my country "x"

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

    Re: sending sms from excel vba

    you're right, it's rownumber.
    I corrected and replaced the + by & in the API but it is doesn't work

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: sending sms from excel vba

    The message has embedded spaces. This is not legal in a URL.

    Please Login or Register  to view this content.
    Spaces must be converted to %20 in a URL. Do this after the URL is complete:

    Please Login or Register  to view this content.
    I am still getting automation error with your code, still trying to figure out what else is wrong.

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

    Re: sending sms from excel vba

    OK, thanks.
    I'm also looking on my side.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: sending sms from excel vba

    Using these changes I was able to send sms-message.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

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

    Re: sending sms from excel vba

    Thank you for your contribution. I was able to send the messages as well. Really, thank you.

    However, without asking too much, I have another provider that offers me more benefit. So, I would like to replace the previous url with this one.

    app.techsoft-web-agency.com/sms/api?action=send-sms&api_key=Um9kcnlnMTIzOnNhbG9tZQ==&to=PhoneNumber&from=SenderID&sms=YourMessage&unicode=1[/url]

    Please what should I modify for its configuration

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

    Re: sending sms from excel vba

    I have to cut the first part of the url because I am not allowed to post the links

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

    Re: sending sms from excel vba

    This is how I configured the new url according to the documentation I found on their site.
    But at the line "objWinHTTP.Open" GET ", URL & Request, False" I am told that the url uses an unrecognized protocol




    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    03-25-2021
    Location
    USA
    MS-Off Ver
    2016
    Posts
    8

    Re: sending sms from excel vba

    Thanks Experts!

+ 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. sending sms from excel vba
    By rodryg123 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-08-2020, 06:33 AM
  2. Replies: 1
    Last Post: 01-08-2016, 09:57 AM
  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. 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. [SOLVED] EXCEL FORMAT PROBLEM WHEN SENDING EXCEL SHEET AS MESSAGE BODY IN .
    By P.S.Sodha in forum Excel General
    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