PDA

View Full Version : Two Parameters in a web query



priya123
04-26-2007, 11:04 AM
Hi Friends,

Is it possible to have two parameters passed in a web query. If so can any one guide me on how to go about it. I need the two bold paramters at the bottom ( dates) to be passed as parameter to a web query.

Please guide me.

Thanks



"URL;http://aaabbbcc.htmll?reqMode=TimeWindow _
&minDate=04/26/2007&minTime=27000&maxDate=04%2F26%2F2007&maxTime=36000 _
&parentProcessId=446&siteId=61&runReport.x=8&runReport.y=7)

priya123
05-02-2007, 12:24 PM
Hi,

I took the help of Matt's way on pulling data using .iqy files.
http://vbaexpress.com/forum/showthread.php?p=96127#post96127



I need to write a webquery where in the dates are dynamic. The code is given below. My code is not picking up the dates from the cell A3 and B3 any thoughts on how to do this. I appreicate your great help. Thanks

Sub macro_rfpickIQY()

Dim vFF As Long, tStr As String, vInFile As String, vOutFile As String, tstr1 As String
vInFile = "C:\Documents and Settings\priyas\My Documents\Query\rfpick.iqy"
vOutFile = "C:\Documents and Settings\priyas\My Documents\Query\rfpick1.iqy"
vFF = FreeFile
Open vInFile For Binary As #vFF
tStr = Space$(LOF(vFF))
' tstr1 = Space$(LOF(vFF))
Get #vFF, , tStr
Get #vFF, , tstr1
Close #vFF
tStr = Replace(tStr, "MYMINDATE", Format(Range("A3").Value, "mm/dd/yyyy"))
tstr1 = Replace(tStr, "MYMAXDATE", Format(Range("b3").Value, "mm/dd/yyyy"))
Open vOutFile For Output As #vFF
Print #vFF, tstr1;
Close #vFF
End Sub