• 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


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

Setting up Environment variable in excel


I have created an excel macro which uses a variable named URL in it.
The URl would change repeatedly as I am sharing the workbook with multiple stakeholders in my team. Also I am protecting my worksheet which contains the data and the VBA code.

Could anyone provide me a way by which I can make the user change the value to the URL from the UI of excel.[bot touching the sheet or the vba]

Sub SubmitTokenisationRequest(strPaylodValue)
    Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
    'URL = "https://payment-gateway-service.apps.nonprod.mem.cloud.autozone.com/commercial/payments-processing/v1/test/token"
    'URL = "https://payments.vantivprelive.com/vap/communicator/online"
    URL = "https://payment-gateway-service-test.apps.nonprod.mem.cloud.autozone.com/commercial/payments-processing/v1/test/token"
    objHTTP.Open "POST", URL, False
    objHTTP.setRequestHeader "Content-Type", "application/xml"
    objHTTP.setRequestHeader "Accept", "application/xml"
    objHTTP.setProxy 2, "proxy.autozone.com:80", ""
    'MsgBox strPaylodValue
    objHTTP.send (strPaylodValue)
    strResponseStatus = objHTTP.Status
    strResponseText = objHTTP.ResponseText
    strResponseText = CStr(strResponseText)
End Sub