View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VBA simple one..

set rng = Worksheets("sheet3").Range("A1")
With Selection.QueryTable
.Connection = _
"URL;" & rng.Value & "?week=2&stat1=S&stat2=W"
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "19"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub

--
Regards,
Tom Ogilvy

"Brian" wrote in message
...
All I want to do is change this VBA program to look at a
cell in the worksheet for the address instead of what it
is doing now. Any ideas? Brian


With Selection.QueryTable
.Connection = _
"URL;http://football.fantasysports.yahoo.com/f2/47
95/2?week=2&stat1=S&stat2=W"
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "19"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub