VBA - Scriptfehler
Stefan.Mahl
hier mal mein Script.
Leider funktioniert es nur für eine Zelle (z.B. Cells (1,1)) und nicht wenn es über den Counter (r) hochgezählt wird.
Kann mir hier jemand helfen?
Danke + Gruß,
Stefan
Sub Aufruf()
Range("A1").Select
anzZeil = Selection.CurrentRegion.Rows.Count
For r = 1 To anzZeil - 1
Call URL_Load(Cells(r, 1))
Next r
End Sub
Private Sub URL_Load(ByVal sURL As String)
Dim appIE As Object
Dim sTxt As String
Set appIE = CreateObject("InternetExplorer.Application")
appIE.navigate sURL
Do: Loop Until appIE.Busy = False
Do: Loop Until appIE.Busy = False
sTxt = appIE.document.documentElement.outerHTML
Set appIE = Nothing
Close
Open "C:\temp\" & Cells(r, 4) & ".txt" For Output As #1
Print #1, sTxt
Close
End Sub