Home > Net >  How to pass input parameter to VBA http POST URL
How to pass input parameter to VBA http POST URL

Time:09-20

I am new to VBA . I am trying to get some input parameters from InputBox and I want to pass this InputBox element to my post request URL . but I don't know how should I pass the value to my URL?

for eg-> Dim iInput As String iInput = InputBox("Please enter a number", "Create Invoice Number", "Enter your input text HERE")

Url = "myurl.com/api/v4/projects/3765/ref/master/trigger/pipeline?token=123&variables[check1]=2" objHTTP.Open "POST", Url, False

here, Instead of 2(in the end) I need to pass this 2 through InputBox by taking userinput. how we should modify the current URL? please let me know. thanks

CodePudding user response:

You can concatenate two strings with &

Url = "myurl.com/api/v4/projects/3765/ref/master/trigger/pipeline?token=123&variables[check1]=" & iInput
  • Related