Hi,
Im using excel 2010 and am currently working on a project that involves my importing specific data from a large number of websites. Currently i'm using this piece of code i captured using the recorder and manually pasting in the url. Which as you can imagine is taking me forever.
Sub Macro1()
'
' Macro1 Macro
'
ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://statsheet.com/mcb/games/2012/11/30/depaul-80-auburn-76/flow" _
, Destination:=Range("$A$1"))
.Name = "flow"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = """tab"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
I have begun to compile a list of the web addresses in Sheet1 and i was wondering if anyone could help me find or write a piece of code that will draw the url from cell A1 in sheet1. Instead of me manually pasting it in every time.
I've attached the workbook to further illustrate what im trying to do.
Many thanks for any help that could be given on this, i've googled a million different things to try and find the solution.
College Basketball Database.xlsm
Bookmarks