Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Parameter in a web query

MyDate = Application.InputBox(prompt:="Enter Date", Type:=2)
If IsDate(MyDate) Then
StrDate = Format(MyDate, "YYYYMMDD")


With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.nba.com/schedules/index.html?gamedate=" & StrDate, _
Destination:=Range("A1"))
.Name = "index.html?gamedate=" & StrDate
.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 = """scheduleTable"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Else
MsgBox ("Bad Date")
End If

"Jai" wrote:

I am currently running web query to retrieve a table from the NBA website using
http://www.nba.com/schedules/index.h...edate=20090205 ,
where the date at the end changes from day to day. I have no idea how to use
a parameter for a web query. Would greatly appreciate any help anyone can
provide. Thanks, Jai

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
Parameter query in MS Query from Excel Jimbo Excel Discussion (Misc queries) 1 September 9th 09 04:27 PM
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
How to choose if I use a parameter or not in a parameter query Arnaud Excel Discussion (Misc queries) 0 March 8th 07 01:19 PM
Parameter query mtate Excel Programming 2 April 20th 05 09:02 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 06:52 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"