HI, I would like to have my macro loop through a list on sheet LoopList from a1 to a450
a1=15
a2=15.1
a3=15.2
etc.....
my loop will be changing a website address (which has the data) by my LoopList #'s
I have tried
************************
For i = 15.1 To 18 Step 0.1
With Worksheets("Temp").QueryTables.Add(Connection:= _
"URL;http://www.websitehere" & i & "the rest of the website here.com" _
, Destination:=Worksheets("Temp").Range("$A$" & lastRow))
.Name = "table"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = "1"
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = True
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
*modifications to the sheet
next i
***************************
This will not place a decimal in my i (or my website address)
So I figured, i should have a list and it to grab specific numbers from there. I do not know how to go about doing this.
a1=15
a2=15.1
a3=15.2
etc.....
my loop will be changing a website address (which has the data) by my LoopList #'s
I have tried
************************
For i = 15.1 To 18 Step 0.1
With Worksheets("Temp").QueryTables.Add(Connection:= _
"URL;http://www.websitehere" & i & "the rest of the website here.com" _
, Destination:=Worksheets("Temp").Range("$A$" & lastRow))
.Name = "table"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = "1"
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = True
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
*modifications to the sheet
next i
***************************
This will not place a decimal in my i (or my website address)
So I figured, i should have a list and it to grab specific numbers from there. I do not know how to go about doing this.