Private
Sub
cbBerechnen_Click()
Dim
Von
As
String
Dim
Nach
As
String
Dim
Entfernung
As
String
Dim
IEApp
As
Object
Dim
IEDocument
As
Object
Dim
IEDoc
As
Object
Dim
blnGefznden
As
Boolean
Dim
RouteStr
As
String
Dim
strTeile
As
Variant
Dim
i
As
Long
Dim
msg
As
String
Dim
blnGefunden
As
Boolean
Von = tbVon.Text
Nach = tbNach.Text
Dim
Zeile
As
Integer
Zeile = 2
Do
While
Cells(Zeile, 1) <>
""
Zeile = Zeile + 1
Loop
Cells(Zeile, 1) = Von
Cells(Zeile, 2) = Nach
Set
IEApp = CreateObject(
"InternetExplorer.Application"
)
IEApp.Visible =
True
Do
:
Loop
Until
IEApp.Busy =
False
Set
IEDocument = IEApp.Document
strTeile = Split(IEDocument.Body.innerText, vbCrLf)
For
i = LBound(strTeile)
To
UBound(strTeile)
If
InStr(1, strTeile(i),
"Minuten"
, vbTextCompare) > 0
Then
If
IsNumeric(Left(strTeile(i), 1)) =
True
Then
blnGefunden =
True
Entfernung =
"Von: "
& Von & vbLf &
"Nach: "
& Nach & vbLf & strTeile(i)
msg = msg & strTeile(i) & vbNewLine
End
If
End
If
Next
i
Unload
Me
End
Sub