Try something like this...

Sub Get_FRED()
    Dim StartDate As Date, EndDate As Date
    
    StartDate = Range("A1").Value
    EndDate = Range("A2").Value
    
    With CreateObject("InternetExplorer.Application")
        .Visible = True
        .Navigate "http://research.stlouisfed.org/fred2/series/BAMLC0A0CM/downloaddata"
        Do Until .ReadyState = 4: DoEvents: Loop
        .Document.getelementbyid("obs_start_date").Value = Format(StartDate, "yyyy-mm-dd")
        .Document.getelementbyid("obs_end_date").Value = Format(EndDate, "yyyy-mm-dd")
        .Document.getelementbyid("download_data").Click
    End With
    
End Sub