Download CSV prices - with VBA

Dim strPost As String
Dim objHTTP, replyTXT As String
Dim AuthenticationTicket As String
AuthenticationTicket = ""

Set 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

'save files:
Dim PriceSheetURL As String
Dim PriceSheetCSV As String
Dim iFileNumber As Integer

'rounds:
PriceSheetURL = "http://technet.rapaport.com/HTTP/Prices/CSV2_Round.aspx"
PriceSheetURL = PriceSheetURL & "?ticket=" & AuthenticationTicket

objHTTP.Open "GET", PriceSheetURL, False
objHTTP.send

If objHTTP.Status = "200" Then
'save the file:
PriceSheetCSV = objHTTP.responseText

iFileNumber = FreeFile
Open "C:\Temp\Rounds.csv" For Output As #iFileNumber
Print #iFileNumber, PriceSheetCSV
Close #iFileNumber
End If

'pears:
PriceSheetURL = "http://technet.rapaport.com/HTTP/Prices/CSV2_Pear.aspx"
PriceSheetURL = PriceSheetURL & "?ticket=" & AuthenticationTicket

objHTTP.Open "GET", PriceSheetURL, False
objHTTP.send

If objHTTP.Status = "200" Then
'save the file:
PriceSheetCSV = objHTTP.responseText

iFileNumber = FreeFile
Open "C:\Temp\Pear.csv" For Output As #iFileNumber
Print #iFileNumber, PriceSheetCSV
Close #iFileNumber
End If