Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

333
Views
Retrieving a zip file from a web site using Excel VBA

I'm trying to download a zip file from a public web site http://serviciosede.mineco.gob.es/indeco/BDSICE/homebdsice.aspx.

To download the file this site executes a piece of javascript javascript:__doPostBack('lbutton_BdsiceCompleta',").
I have been downloading manually by clicking on this button, but I would like to do it via Excel VBA.

I'm stuck at retrieving the zip file.

Dim StrWebpage As String
StrWebpage = "http://serviciosede.mineco.gob.es/indeco/BDSICE/homebdsice.aspx"
 
Dim objIE As SHDocVw.InternetExplorer 'microsoft internet controls (shdocvw.dll)
Dim HTMLDoc As MSHTML.HTMLDocument 'Microsoft HTML Object Library
Dim htmlInput As MSHTML.HTMLInputElement
Dim htmlColl As MSHTML.IHTMLElementCollection
    
Set objIE = New SHDocVw.InternetExplorer
 
With objIE
    .Navigate StrWebpage ' Main page
    .Visible = 1
    Do While .Busy: DoEvents:   Loop
 
    Do While .ReadyState <> 4: DoEvents: Loop
 
    Set HTMLDoc = .Document
    Set objIE = New SHDocVw.InternetExplorer
    Set frame = HTMLDoc.getElementsByName("lbutton_BdsiceCompleta")
    Call frame.execScript("lbutton_BdsiceCompleta", "JavaScript")
        
End With
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!