Hi


I need to download an excel sheet data from the below location and automatically copied to my current worksheet. Being new to vba, I tried below things.


URL: https://www.bseindia.com/corporates/List_Scrips.aspx#


challenge is
1. I need to submit the page before I get the data
2. Like any other link, I am not able to directly ping or access the download link. I can see the file at javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnkDownload','')
3. File is 5mb in size and have to copy to the current worksheet.


below is the code which I tried, but still the webpage is hanging.
With IE
IE.Visible = True


'To open the website
.navigate "https://www.bseindia.com/corporates/List_Scrips.aspx#"
 Do While IE.readyState <> 4
       Sleep 1000
   Loop
   IE.document.forms(0).submit
'   Sleep 1000
'    Do While IE.readyState <> 4
'    Sleep 1000
'   Loop




'To download the file
IE.navigate "javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnkDownload','')"
'Do While .Busy: DoEvents: Loop
Please can you suggest what is wrong with the code and how can I import the data to my current worksheet.