Downloading a file from the Web

PDI0001

New Member
Joined
May 31, 2012
Messages
1
Hi All,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
I am new to this message board and somewhat new to VBA (a few months of experience). Maybe it is my inexperience but I ran into a problem that I was not able to solve by searching google. I am trying to streamline a process for my company that usually takes forever. I need to export website reports in excel format. First I have to select Excel (65) from a drop down menu on the page, which I am able to do. Then I have to click on the Save As (btnExport) button on the webpage, however when I do this with VBA a new window appears and then goes away without anything else happening. If I click with my mouse a save as box appears like normal. What am I doing wrong? Here is my code.<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
‘select Excel from the dropdown list<o:p></o:p>
ieApp.document.getElementById("ddExportList").Value = "65"<o:p></o:p>
<o:p></o:p>
Do While ieApp.Busy: DoEvents: Loop
Do Until ieApp.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop<o:p></o:p>
<o:p></o:p>
‘click the Save As button<o:p></o:p>
ieApp.document.getElementById("btnExport").Click<o:p></o:p>
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,216,075
Messages
6,128,657
Members
449,462
Latest member
Chislobog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top