• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SMS sent through VBA

JAMIR

Member
Hello Respected Excel Ninjas & My Friends,

I have creating VBA Application with SQL query for Vehicle Maintainance Workshop. I have 1000+ vehicle to handle.

So my question is can v send the SMS to concern on his MOBILE if vehicle enter in Workshop for maintainance....?

If yes, please give the solution for it..? It will be very helpful to me....

Warm Regards,


Zameer
 
Hello Narayan Sir,

Thanks for immediate reply...., But i am using Internet..... It is required a phone modem. Could you please tell me how i go though this.....

Warm Regards,


Zameer Shaikh
 
Hi Zameer ,

Sorry , but I have not experimented with this add-in ; you will have to download and install it and see if it works. The site mentions that wireless modems are also compatible with their software.

Narayan
 
Hello Chihiro,

Thanks for your reply, i had go through above link, but its bouncer.... Do me favor... I am not be so much good in coding.. Could you tell me how to go through this....

I want to send the MSG to receipt if his vehicle is enter in my workshop....

for Enter : VEH No.MH11BL12345 is received for ACCIDENT.

If vehicle Ready: VEH No.MH11BL12345 is Ready for Collection.

If vehicle Out: VEH No.MH11BL12345 is OUT from Workshop.

Warm Regards,

Zameer Shaikh
 
There are many service providers who sends sms thru there applications or excel addin, please search on google for the same.

below are some urls

http://www.smsco.it/tomcat/en/sms_tutorials/sms_from_excel.jsp
http://www.activexperts.com/xmstoolkit/howto/gsm/vba/


Hello Chihiro,

Thanks for your reply, i had go through above link, but its bouncer.... Do me favor... I am not be so much good in coding.. Could you tell me how to go through this....

I want to send the MSG to receipt if his vehicle is enter in my workshop....

for Enter : VEH No.MH11BL12345 is received for ACCIDENT.

If vehicle Ready: VEH No.MH11BL12345 is Ready for Collection.

If vehicle Out: VEH No.MH11BL12345 is OUT from Workshop.

Warm Regards,

Zameer Shaikh
 
Add-in will work fine.

Custom coding, I'd not recommend unless you are somewhat familiar with basics.

Link below with some modification will do what you are looking for.
http://www.rondebruin.nl/win/s1/outlook/bmail4.htm

As stated in linked thread (in previous post), you will need to know gateway for recipients' cell# to send SMS. By using Add-in (which usually contains library to handle this part) you can skirt the process of finding out the correct gateway.
 
Hello JAMIR,
"VB6 SMS API integration code"

Code:
Private Sub Command1_Click()
    Dim DataToSend As String
    Dim objXML As Object
    Dim message As String
    Dim authKey As String
    Dim mobiles As String
    Dim sender As String
    Dim route As String
    Dim URL As String

'Set these variables
authKey = "Your auth key";

mobiles  = "9999999999";

'Sender ID,While using route4 sender id should be 6 characters long.
sender = "TESTIN"; 

' this url encode function may not work fully functional.

message = URLEncode(" Your message ")

'Define route
route = "default" 
' do not use https 
URL = "https://control.msg91.com/api/sendhttp.php?" 

Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.Open "POST", URL , False
objXML.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
   
objXML.send "authkey=" + authKey + "&mobiles=" + mobiles + "&message=" + message + "&sender=" + sender + "&route=" + route

 If Len(objXML.responseText) > 0 Then
        MsgBox objXML.responseText
       
 End If
     
End Sub

Function URLEncode(ByVal Text As String) As String
    Dim i As Integer
    Dim acode As Integer
    Dim char As String
   
    URLEncode = Text
   
    For i = Len(URLEncode) To 1 Step -1
        acode = Asc(Mid$(URLEncode, i, 1))
        Select Case acode
            Case 48 To 57, 65 To 90, 97 To 122
                ' don't touch alphanumeric chars
            Case 32
                ' replace space with "+"
                Mid$(URLEncode, i, 1) = "+"
            Case Else
                ' replace punctuation chars with "%hex"
                URLEncode = Left$(URLEncode, i - 1) & "%" & Hex$(acode) & Mid$ _
                    (URLEncode, i + 1)
        End Select
    Next
   
End Function
You can use this code for Send SMS through vba or also search best bulk SMS api provider
 
Last edited by a moderator:
Hii Teena it is great to find "VB6 SMS API integration code" here in this forum. Even I believe MSG91 is one of the best bulk SMS SPI provider in India
 
The problem is that I want to send an SMS with a click of a button as soon as an invoice has been made.

That's why I thought VBA would be a good option.

So basically through VBA, with a click of a button, I can send Mass SMS.
 
Back
Top