cross-posted in:
https://www.reddit.com/r/vba/comment...d_submit_form/

I watched wiseowl on webscrapping but he didn't share how i can use HTTP requests to fill and submit forms. so i googled "vba xmlhttp fill form"
got 2 links i tried, but didn't know how to contextualize.

Public Sub XmlHttpTutorial()
'https://codingislove.com/http-requests-excel-vba/
'tools -> references -> MS XML vX.0
Dim xmlhttp As New MSXML2.ServerXMLHTTP60
Dim myurl As String
myurl = "http://www.linkedin.com"
xmlhttp.Open "GET", myurl, False
xmlhttp.send
user = "someusername"
Password = "somepassword"
xmlhttp.setRequestHeader "Authorization", "Basic " + Base64Encode(user + ":" + Password)
End Sub
no idea what the last line is doing. don't know what is "Authorization", "Basic", "Base64Encode". i am guessing the last line shouldn't use "+".

another is:

Sub Post_HTTP_Form()
'https://stackoverflow.com/questions/8798661/automate-submitting-a-post-form-that-is-on-a-website-with-vba-and-xmlhttp
'Requires reference to "Microsoft XML, v6.0" or better. (Tools>References)
    Dim msXML As New XMLHTTP60, resp As String
    With msXML
        .Open "POST", "http://www.linkedin.com", False
        .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
        .send "{PARAMETER}={VALUE}"
        resp = StrConv(.responseBody, vbUnicode)
    End With
    Debug.Print resp 'outputs to Immediate Window (CTRL+G to view)
    Set msXML = Nothing
End Sub
there were 3 curly brackets the contributor gave. one is the url, which i changed. not sure what parameter and value should be. although he didn't put a curly bracket on the RequestHeader, i reckon it is something i should change too.

how do i also ensure it logs in successfuly since i don't see the browser physically?