Private
Sub
CommandButton21_Click()
Zeilen = Worksheets(
"Entfernungen"
).UsedRange.SpecialCells(xlCellTypeLastCell).Row
For
schleife = 1
To
Zeilen
Dim
IEApp
As
Object
, luftlinie
As
Object
Set
IEApp = CreateObject(
"InternetExplorer.Application"
)
IEApp.Visible =
False
Do
:
Loop
Until
IEApp.busy =
False
Do
:
Loop
Until
IEApp.busy =
False
Do
:
Loop
Until
IEApp.document.readyState =
"complete"
Set
luftlinie = IEApp.document.getElementById(
"airline"
)<strong>=> hier entsteht der Laufzeitfehler 424</strong>
If
Not
luftlinie
Is
Nothing
Then
Worksheets(
"Entfernungen"
).Cells(schleife, 3) = Zahlen_übernehmen(luftlinie.innertext) / 100
End
If
IEApp.Quit
Set
IEApp =
Nothing
Next
schleife
End
Sub
Schon mal Danke für eure Hilfe.
MfG Daniel