Ummm,
Thanks for your response, However
I am getting an error
"Compile error
Duplication declaration in current scope"
Getting error at
Here is my full code:
Sub Sample()
Const sUser As String = "9999999999"
Const sPw As String = "Password"
Const sId As String = "SMSBUZ"
Const baseUrl As String = "http://smsidea.co.in/sendsms.aspx"
Dim sReq As String, myMsg As String, dest As String
Dim resp As String
Dim myMsg As String
With Sheets("Sheet1")
myMsg = "Hi you made a sales to " & .Range("C3").Text & " with " & .Range("Q42").Text & "."
End With
myMsg = encodeURL(myMsg)
dest = "999999999"
sReq = "?mobile=" & sUser & "&pass=" & sPw & "&senderid=" & sId & "&to=" & dest & "&msg=" & myMsg
With CreateObject("MSXML2.xmlHttp") 'May need to change this to MSXML2.ServerXMLHTTP
.Open "POST", baseUrl & sReq, False
.setRequestHeader "Content-type", "application/x-www-form-urlencoded" 'You will need to find from vendor what headers are needed
.Send
resp = .responseText
End With
End Sub
Bookmarks