Rapaport Lot Upload HTTP POST/WebClient and CSV file - with VBA

Public Sub UploadRap()
    Dim strPost As String
    Dim objHTTP, replyTXT As String
    Dim AuthenticationTicket As String
    AuthenticationTicket = ""
    objHTTP = CreateObject("Msxml2.ServerXMLHTTP")
    strPost = "https://technet.rapaport.com/HTTP/Authenticate.aspx"
    'Get authentication ticket:
    objHTTP.Open("POST", strPost, False)
    Call objHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
    objHTTP.send("Username=username&Password=password")
    replyTXT = objHTTP.responseText
    If objHTTP.Status = "200" Then 'success
    AuthenticationTicket = replyTXT
    Else
    'authentication failed, you need to deal with this.
    AuthenticationTicket = ""
    End If
    Stop
    Dim DestURL As String
    DestURL = "http://technet.rapaport.com/HTTP/Upload/Upload.aspx?Method=file"
    DestURL = DestURL & "&ticket=" + AuthenticationTicket
    DestURL = DestURL & "&ReplaceAll=true&FirstRowHeaders=true&LotListFormat=Rapnet"
    Dim FileName As String
    FileName = "c:\stock.csv"
    UploadFile(DestURL, FileName, "Stock")
End Sub

Sub UploadFile(ByVal DestURL As String, ByVal FileName As String, _
    Optional ByVal FieldName As String = "File")
    Dim sFormData As String, D As String
    Stop
    'Boundary of fields.
    'Be sure this string is Not In the source file
    Const Boundary As String = "---------------------------0123456789012"
    'Get source file As a string.
    sFormData = GetFile(FileName)

    'Build source form with file contents
    D = "--" & Boundary & vbCrLf
    D = D & "Content-Disposition: form-data; name=""" & FieldName & """;"
    D = D & " filename=""" & FileName & """" & vbCrLf
    D = D & "Content-Type: application/upload" & vbCrLf & vbCrLf
    D = D & sFormData
    D = D & vbCrLf & "--" & Boundary & "--" & vbCrLf

    'Post the data To the destination URL
    IEPostStringRequest(DestURL, D, Boundary)
End Sub


'sends URL encoded form data To the URL using IE
Sub IEPostStringRequest(ByVal URL As String, ByVal FormData As String, ByVal Boundary As String)
    'Create InternetExplorer
    Dim WebBrowser : WebBrowser = CreateObject("InternetExplorer.Application")

    'You can uncoment Next line To see form results
    WebBrowser.Visible = True

    'Send the form data To URL As POST request
    Dim bFormData() As Byte
    ReDim bFormData(Len(FormData) - 1)
    bFormData = StrConv(FormData, vbFromUnicode)
    WebBrowser.Navigate(URL, , , bFormData, _
    "Content-Type: multipart/form-data; boundary=" & Boundary & vbCrLf)
    Do While WebBrowser.Busy
    ' Sleep 100
    DoEvents()
    Loop
    WebBrowser.Quit()
End Sub

    'read binary file As a string value
Function GetFile(ByVal FileName As String) As String
    Dim FileContents() As Byte, FileNumber As Integer
    ReDim FileContents(FileLen(FileName) - 1)
    FileNumber = FreeFile()
    Open FileName For Binary As FileNumber
    Get FileNumber, , FileContents
    Close(FileNumber)
    GetFile = StrConv(FileContents, vbUnicode)
End Function