Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default VBA simple one..

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default VBA simple one..

Tom,

It is giving me an 'object required' error. hmm.. any
more ideas?

I need to
change "URL;http://football.fantasysports.yahoo.com/f2/47
95/2?week=2&stat1=S&stat2=W"


to "URL;http://football.fantasysports.yahoo.com/f2/47
95/[VARIABLE IN WORKSHEET]?week=[VARIABLE IN WORKSHEET]

&stat1=S&stat2=W"

-----Original Message-----
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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default VBA simple one..

Is this what you mean?

set rng = Worksheets("sheet3").Range("A1")
With Selection.QueryTable
.Connection = _
"URL;http://football.fantasysports.yahoo.com/f2/4795/" & rng.Value &
"?week=" & rng.Value
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "19"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
...
Tom,

It is giving me an 'object required' error. hmm.. any
more ideas?

I need to
change "URL;http://football.fantasysports.yahoo.com/f2/47
95/2?week=2&stat1=S&stat2=W"


to "URL;http://football.fantasysports.yahoo.com/f2/47
95/[VARIABLE IN WORKSHEET]?week=[VARIABLE IN WORKSHEET]

&stat1=S&stat2=W"

-----Original Message-----
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



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Make it more simple or intuitive to do simple things Vernie Charts and Charting in Excel 1 March 16th 05 04:01 AM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


All times are GMT +1. The time now is 01:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"