über das lob habe ich mich sehr gefreut!
da habe ich gleich noch einen fehler beim error-handling gefunden, sodaß zeilen fehlen.
hier die korrektur:
Sub webabfrage()
url = „URL;http://www.brancheninfo.de/index.php“
url = url + „?branche=ELEKTROtechnik&name=&strasse=&plz=&ort=“
url = url + „&branchen_id=&search=2&page=“
Set ziel = Worksheets(„Tabelle1“).Cells(1, 1)
With Application
.DisplayAlerts = False
.ScreenUpdating = False
End With
On Error Resume Next
Worksheets(„scratch“).Delete
On Error GoTo 0
Worksheets.Add.Name = „scratch“
With Worksheets(„scratch“)
With ActiveSheet.QueryTables.Add(Connection:=url + „0“, Destination:=.Range(„A1“))
.Name = „webabfrage“
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
For seite = 1 To 1000
Application.StatusBar = seite
With .Cells
On Error Resume Next
.Find(„TOP“, MatchCase:=True).Value = „ELEKTROTECHNIK“
If Err.Number = 91 Then .Find(„ANZEIGEN“).Value = „ELEKTROTECHNIK“
On Error GoTo 0
Set anfang = .Find(„ELEKTROTECHNIK“, MatchCase:=True)
For zeile = 1 To 20
Set ende = .FindNext(After:=anfang)
If ende.Row