Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brian,
If you want to follow up via e-mail then maybe we can sort out your problem. saxifrax at pacbell dot net Tim. "Brian Delaney" < wrote in message ... Tim, Thanks a million. You not only pointed me in the right direction for nearly (ugh) solving my problem, but, more fortunately for this vba beginner, your procedure and functions REALLY helped me to get a better grasp on the HTML object model, the syntaxes for which I'd been struggling to interpret from MSDN libraries. I needed to take your procedure one step further than selecting the option. I also needed to activate it because, unlike the Xe site, the site I'm working on doesn't have the eqivalent of a 'Submit' button; rather, just selecting the option causes the navigation to the next page. I cannabalized your SetList function to accomplish this Dim o As Object, el As Object, y As String 'get a reference to the document object Set o = GetHTMLDocument("http://www.futons.net/index.asp?PageAction=VIEWPROD&Pro dID=2845") Set el = o.frmMFGSearch.txtSearch 'list has no "id" attribute 'Set el = o.getElementById("FilterNameSelect") 'list has an "id" y = "Dream On Futon Covers" If Not o Is Nothing Then Dim x As Integer For x = 0 To el.Options.Length - 1 If el.Options(x).Text = y Then el.selectedIndex = x el.fireEvent ("onchange") Exit For End If Next End If End Sub Unfortunately, I still can't get this to work on my target web page because I can't identify a form to which the listbox object belongs. (I may be dealing with frames?) The page is organized by multiple Tabs, on only one of which the listbox appears. I tried substituting the particular Tab id (as well as a few others) for the form name but no luck. AND there is also relevant HTML code for a form which does contain the selected option but Set el = o.FormName.ListboxName returns Error 438. I'm baffled. (And, sorry, I'm reluctant to post the HTML code because it's for a web page on a brokerage site and I'm new enough to this to still not know what type of info is safe to post to newsgroups.) Thanks for your help so far and any more you can offer. Brian P.S. The Xe site was a relevant and coincidental reference as I had just the day before been trying to download info from one of its tables...and gave up! That said, any tips on just copying a table from a web page in its HTML format into an excel sheet? *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stop excel from processing HTML? IE paste raw html. | Excel Discussion (Misc queries) | |||
Newbie needs help deciphering formula. | Excel Worksheet Functions | |||
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) | Excel Programming | |||
Help Deciphering a Lotus Macro Snippet | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming |