Controlling IE11 "möchten Sie die Öffnen/Speichern" Dialog-Fenster-Schaltflächen in VBA

Müssen wir die download-Datei von einem NASDAQ-website automatisch. Meine vorhandenen VBA-code öffnet ein IE - "möchten Sie die Öffnen/Speichern" Dialog-Fenster. Wie bitte klicken Sie auf die Schaltfläche speichern und geben Sie einen Pfad über VBA ?
Ich habe verschiedene windows-api beschriebenen Methoden in diesem link hier auch, aber das ist, was eine Folge von "Fenster Nicht Gefunden".

Mein Aktueller code ist wie folgt:

Sub MyIEauto()

    Dim ieApp As InternetExplorer
    Dim ieDoc As Object
    'Dim ieTable As Object

    'create a new instance of ie
    Set ieApp = New InternetExplorer

    'you don’t need this, but it’s good for debugging
    ieApp.Visible = True
    'assume we’re not logged in and just go directly to the login page
    ieApp.Navigate "https://indexes.nasdaqomx.com/Account/LogOn"
    Do While ieApp.Busy: DoEvents: Loop
    Do Until ieApp.readyState = READYSTATE_COMPLETE: DoEvents: Loop

    Set ieDoc = ieApp.Document
    'fill in the login form – View Source from your browser to get the control names
    With ieDoc.forms(0)
        .UserName.Value = "xxxxxxx"
        .Password.Value = "xxxxxxx"
        .submit
    End With
    Do While ieApp.Busy: DoEvents: Loop
    Do Until ieApp.readyState = READYSTATE_COMPLETE: DoEvents: Loop

    'now that we’re in, go to the page we want
    ieApp.Navigate "https://indexes.nasdaqomx.com/Index/ExportWeightings/NDX?tradeDate=2015-08-19T00:00:00.000&timeOfDay=SOD/SODWeightings_2015"

    'next below line commented as it is failing
    'ieApp.ExecWB 4, 2, "D:\VBA code work\SODWeightings_20150819_NDX.xlsx" 

    set ieApp=Nothing
    set ieDoc=Nothing

End Sub

Die Abbildung unten zeigt, wo habe ich erreicht. Wie kann ich die Fortschritte von hier?

Controlling IE11

InformationsquelleAutor pmr | 2015-08-21

Schreibe einen Kommentar