Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Change Web Page Drop-Down To Fire Code

CROSSPOST
http://www.ozgrid.com/forum/showthread.php?t=91246

Hello, I'm using XP, MSO2003 & IE6.
My question centers around controlling internet explorer through VBA code
written in an excel workbook.
I am trying to query an online database and retrieve a value to use in a
much larger excel program. The website is given below.
http://gisims2.miamidade.gov/MyHome/proptext.asp
I am running into difficulties because the website contains a dropdown box
("Search by") which changes the form fields (found below the dropdown) based
on its selection. Unfortunately, while I am able to set the value of this
dropdown, that is not sufficient to "fire" the event operation responsible
for controlling the available fields.

I hope to remedy this by making the dropdown the "active" object and then
changing the value. (I have tried to simulate this operation by tabbing
through the webpage till I reached the dropdown and then changing the value.
That worked.)

I have attempted this using the line below. While it does not crash, it
doesn't appear to do anything either.
VB: AutoLinked keywords will cause extra spaces before keywords. Extra
spacing is NOT transferred when copy/pasting, but IS if the keyword uses
"quotes".

..Item("bytool").setActive

Same story with:
VB: AutoLinked keywords will cause extra spaces before keywords. Extra
spacing is NOT transferred when copy/pasting, but IS if the keyword uses
"quotes".

..Item("bytool").Focus

VB: AutoLinked keywords will cause extra spaces before keywords. Extra
spacing is NOT transferred when copy/pasting, but IS if the keyword uses
"quotes".

Sub PropInfo()
Dim appIE As SHDocVw.InternetExplorer
Set appIE = New SHDocVw.InternetExplorer
appIE.Visible = True
appIE.navigate "http://gisims2.miamidade.gov/MyHome/proptext.asp"
Do While appIE.Busy: DoEvents: Loop
Do While appIE.readyState < 4: DoEvents: Loop
With appIE.document.frmNavigation
..Item("bytool").setActive
..Item("bytool").Value = "ADDR" 'Search by' dropdown
..Item("stnum").Value = "2417" 'house #' field
..Item("stdir").Value = ""
..Item("stname").Value = "ponce de leon" 'street name' field
..Item("sttype").Value = "BLVD" 'street type' field
..submit
End With
End Sub

I would greatly appreciate anyone's help with this.
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
How to make this fire at every page break?? Mekinnik Excel Programming 0 January 28th 08 06:06 PM
Why does change event fire when workbookclosed Rick Humphrey Excel Programming 2 April 6th 07 01:04 AM
Fire Macro from Cell Change Slashman Excel Worksheet Functions 7 October 17th 06 04:08 AM
Code will not fire Ray A Excel Programming 5 March 1st 06 05:41 PM
Fire Event only when Cell Change? HotRod Excel Programming 7 April 28th 05 08:43 PM


All times are GMT +1. The time now is 02:03 PM.

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"