# VBA to open website and download a file



## Martin sherk (Dec 18, 2022)

I really need help with this one, as it's so tricky for me.

i download files multiple times a day from an intranet company website, i don't know how to utilize VBA with Java to complete the process

but below is my inspect element for the lines that i need to click on.

1) open the website 
2) Click on "Vendors" button
<span class="dx-vam">Vendors</span>

3) Click on "Ledger" button
<span class="dx-vam dxm-contentText">Ledger</span>

4) Click on a drop down list
<img id="Horizontal_RNC_Menu_ITCNT1_xaf_a2_Cb_B-1Img" class="dxEditors_edtDropDown_Office2010Blue" src="/NetWeb/DXR.axd?r=1_89-mlzPp" alt="v">

5) Choose "Their invoice" from the drop down list
<td id="Horizontal_RNC_Menu_ITCNT1_xaf_a2_Cb_DDD_L_LBI2T0" class="dxeListBoxItem_Office2010Blue">Their invoice</td>

6) click on the drop down list
<img id="Horizontal_v3_10966268_LE_v3_DXFREditorcol13_B-1Img" class="dxEditors_edtDropDown_Office2010Blue" src="/NetWeb/DXR.axd?r=1_89-mlzPp" alt="v">

7) Choose "Missing" from the drop down list
<td id="Horizontal_v3_10966268_LE_v3_DXFREditorcol13_DDD_L_LBI0T1" class="dxeListBoxItem_Office2010Blue dxeT">Missing</td>

8) Click on "Export"
<span class="dx-vam dxm-contentText">Export</span>

9) Click "Ok"
<span class="dx-vam dxm-contentText">OK</span>

10) Wait till it loads then click "Ok" again 
<span class="dx-vam dxm-contentText">OK</span>

11) Wait till it loads then click on the link of download 
<span>AR_Invoices_Status_20221218_17.csv</span>

I would really appreciate if someone can help me automating this process and download this report, it would save us hours ! 

Thanks in advance.


----------

