Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programaticaly update webquery - help
Hi,
I would like to be able to programaticaly change some of the parameters in an webquery. For example if I have a webquery that uses www.somesite.com?day=1&month=2, when I access my workbook the next day and refresh the data it will load the previous days data. So I need some way to change the parameters of the query to http://www.somesite.com?day=(=date.d...date.mont h); Could someone point me to a website that might explain how to program access to do this automatically when the workbook is opened? Thank you Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programaticaly update webquery - help
something like this:
dayoftoday= day(date) monthoftoday=month(date) ConnectString = "URL;www.somesite.com?day=" & dayoftoday & "&month=" & monthoftoday ' Define a new Web Query Set QT = ActiveSheet.QueryTables.Add(Connection:=ConnectStr ing, Destination:=activesheet.Range("A1")) With QT .Name = MyName .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingAll .WebTables = "7" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False End With hope it helps... "Paul" kirjoitti: Hi, I would like to be able to programaticaly change some of the parameters in an webquery. For example if I have a webquery that uses www.somesite.com?day=1&month=2, when I access my workbook the next day and refresh the data it will load the previous days data. So I need some way to change the parameters of the query to http://www.somesite.com?day=(=date.d...date.mont h); Could someone point me to a website that might explain how to program access to do this automatically when the workbook is opened? Thank you Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Webquery | Excel Worksheet Functions | |||
Webquery | Excel Discussion (Misc queries) | |||
Read excel data programaticaly in C/C++ | Excel Programming | |||
How to disconnect when WebQuery done | Excel Programming | |||
Using Webquery via VBA | Excel Programming |