Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default webquery-cookie problems

Thanks Robin, but unfortunately that doesn't work. Does anybody have
any good references as to how web queries work? I'm finding the
documentation in MSDN and in J-walks books lacking...

I know manypeople don't take these posts seriously without some code,
so here it us. I know its ugly, but the parts work (as long as your
browser is IE 6 with favorites shut off...) Any suggestions on how to
execute the button (that I am currently hitting tab 69 times to
activate) would be appreciated.

Part 1: Changing the store info

Sub storechange()
Zip = "08096"
'01923 = ma, 08096 = nj, 33566 = Fl, 31501 = GA, 02895 = RI. there are
many others
Const URL As String = _

"http://www.lowes.com/lowes/lkn?action=productAccess&reset=true&referurl="
Dim ie As Object
Set ie = CreateObject("internetexplorer.application")
Dim gShell As WshShell
Set gShell = New WshShell
gShell.AppActivate ("Microsoft Internet Explorer")

With ie
.Visible = True
.Navigate URL
Do While .ReadyState < 4: Loop
'//Send data to IE
With .Document.all
.SHIP_ZIP.Value = Zip
'Do While ie.ReadyState < 4: Loop
End With
End With

i = 0
Do While i < 69
gShell.SendKeys ("{TAB}")
i = i + 1
Loop


gShell.SendKeys ("{ENTER}")


Set ie = Nothing
Set gShell = Nothing
ie.Quit
'closes window

End Sub


Part 2: getting the data

Sub wqtest()
With ActiveSheet.QueryTables.Add(Connection:= _

"URL;http://www.lowes.com/lkn?action=productList&catalogId=STUDS",
Destination _
:=ActiveCell)
.Name = "lkn?action=productList&catalogId=STUDS"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
'.WebTables = "12"'
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=True
'.MaintainConnection = False
'.RobustConnect = xlAsRequired
'these were things I tried to solve my problem, but they didn't
work
End With
'MsgBox ActiveSheet.QueryTables(1).Parameters.Application

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
Webquery Neale Excel Worksheet Functions 3 August 25th 08 05:26 PM
tough cookie Vincent Excel Discussion (Misc queries) 3 August 27th 07 05:17 PM
Webquery fieldnaming... nippetee Links and Linking in Excel 0 January 26th 05 01:13 PM
Webquery Othello Excel Discussion (Misc queries) 0 December 1st 04 12:41 PM
Using Webquery via VBA Richard Winston Excel Programming 3 December 2nd 03 12:50 PM


All times are GMT +1. The time now is 05:10 AM.

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

About Us

"It's about Microsoft Excel"