using macro to send sms using http api

shahabm

New Member
Joined
Apr 5, 2015
Messages
5
greetings

i am trying to send out sms using an api
http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=username&password=password&sendername=sender id&mobileno=919999999999&message=Hello

i want to get the mobileno from a cell in sheet7 of the workbook from "d" the cursor will be in the same row. just want the value from "d" to be picked up and used as mobile no
i found a code which works well with hard coded number in the mobileno, but getting an error when i try to pull the value . any help will be
[FONT=Arial, Helvetica, sans-serif]appreciated

Code:
[/COLOR][/FONT]Sub SendSms()

    Dim URL As String
    Dim rng As Range
    
 
    URL = "[COLOR=#000000][FONT=Arial]http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=username&password[/FONT][/COLOR][COLOR=#000000][FONT=Arial]=password&sendername=sender id[/FONT][/COLOR]&mobileno=& ThisWorkbook.Worksheets(7).rng.Row("d:d").Value & "&message=Hi test"
        
    Dim xml As Object
    Set xml = CreateObject("MSXML2.XMLHTTP")
    xml.Open "GET", URL, False
    xml.Send
End Sub


[FONT=Arial, Helvetica, sans-serif][COLOR=#000000]


thanks
[/FONT]
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Try:
Code:
    URL = "http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=username&password=password&sendername=sender id&mobileno=" & Cells(ActiveCell.Row, "D").Value & "&message=Hi test"
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top