As June7 has mentioned in the other post, concatenate your varaiables with the string required,
In the example one would be message which is already being concatenated. I would be using & though.
Something along the lines of
then in your formCode:Public Function SendSMS_Text(message As String, number As String) Dim message As String Dim result As String Dim myURL As String, postData As String Dim winHttpReq As Object message = "Hello this is a test message." Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1") myURL = "http://sendpk.com/api/sms.php" postData = "username=923xxx&password=xxx&messsge=" & message & _ "&mobile=" & number & "&mask=BrandName&format=xml" winHttpReq.Open "POST", myURL, False winHttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded" winHttpReq.Send (postData) SendSMS_Text = winHttpReq.responseText Set WinHttpReq = Nothing End Function
Result = SendSMS_Text(Me.Message,Me.Number)
As for speed, I'd try changing the code so that you send all the message in one creation of the WinHttpReq object, rather than creating/releasing each time, but as we do not know how your system is structured, it is hard to say.
This is all code I have not used before, so no knowledge. I would be in 'try and see' mode
how to call this function please elloborate i am stuck with it