Sub Button5_Click)
Dim myURL As String
Dim HttpReq As Object
Set HttpReq = CreateObject("Microsoft.XMLHTTP")
For index_url = 1 To 2 Step 1
myURL = "Put your download link here"
HttpReq.Open "GET", myURL, False, "username", "password"
HttpReq.send
myURL = HttpReq.responseBody
If HttpReq.Status = 200 Then
Set oStrm = CreateObject("ADODB.Stream")
oStrm.Open
oStrm.Type = 1
oStrm.Write HttpReq.responseBody
oStrm.SaveToFile ThisWorkbook.Path & "\" & index_url & ".jpg", 2 ' 1 = no overwrite, 2 = overwrite
oStrm.Close
End If
Next
End Sub