Sub Macro1()
'
' Macro1 Macro
'
'
Dim i As Integer
Dim pos As Integer
Dim r As String
For i = 1 To 3
pos = (i * 200)
r = ("$A$" & pos)
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;"sitoweb/" & i, _
Destination:=Range(r))
.Name = "506"
.FieldNames = True
.RowNumbers = True
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Next i
End Sub
|