Sub
TEST()
Dim
WsName
As
String
Dim
intRow
As
Integer
For
intRow = 1
To
2
ActiveWorkbook.Worksheets.Add
With
ActiveSheet.QueryTables.Add(Connection:= _
"URL;"
& Worksheets(
"Tabelle1"
).Cells(intRow).Value _
, Destination:=Range(
"$A$1"
))
.Name = intRow
.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
WsName = ActiveSheet.Name
Range(
"A2"
).Copy
Sheets(
"Tabelle1"
).
Select
Cells(intRow, 2).
Select
ActiveSheet.Paste
Application.CutCopyMode =
False
Application.DisplayAlerts =
False
Sheets(WsName).
Select
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts =
True
Next
intRow
End
Sub