title: How to save file from Webpage from Excel VBA?
body: <p>I am trying to export a file from IE, after selecting an item in dropdown by taking the Html ID and clicking the export option, but i am strucked while saving the file.<br>
  I am Selecting the option in the dropdown based on the value in an excel range.  </p>
  
  <p>Please help.<br>
  Below is the code I am trying.</p>
  
  <pre><code>Dim htm As Object
  Dim IE As Object
  Sub Website()
  
      Dim Doc As Object
      Set IE = CreateObject("internetexplorer.application")
      IE.Visible = True
  
      IE.navigate "http://**Link is confidential, sorry for not providing link**"
  
      Do While IE.readystate &lt;&gt; 4: DoEvents: Loop
  
      Set Doc = CreateObject("htmlfile")
      Set Doc = IE.document
  
          Set ref = Doc.getelementbyid("ReportViewerControl_ctl01_ctl05_ctl00")
          For x = 0 To ref.Options.Length - 1
              If ref.Options(x).Text = "Excel" Then
                  ref.selectedIndex = x
                  Set refclick = Doc.getelementbyid("ReportViewerControl_ctl01_ctl05_ctl01")
                  refclick.Click
                  Set refclick = Nothing
              End If
          Next
      Set IE = Nothing
  End Sub    
  </code></pre>
  
  <p>And the snap shot I am strucked here, and here i want to save the file.<br>
  <img src="https://i.stack.imgur.com/zqRSt.jpg" alt="how to select Save"></p>