Cap'n Jack
Final Approach
Option Explicit
Const WEBPAGE1 As String = "http://adds.aviationweather.gov/metars/"
Const STATIONID As String = "KLNK"
Const LISTSELECTION = 10
Public oIE As SHDocVw.InternetExplorer
______________________________________________________
Sub FillForm()
Dim objParentForm As Object
Dim objInputElement As Object
Set oIE = New SHDocVw.InternetExplorer
Dim strPage As String
'go to the web site- wait until page loads
oIE.Navigate WEBPAGE1
Do Until oIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
'fill out web form
Set objParentForm = oIE.Document.Forms("textForm")
objParentForm.Item("station_ids").Value = STATIONID
objParentForm.Item("hoursStr").selectedindex = LISTSELECTION
objParentForm.Item("submitmet").Click
'wait for new data
Do Until oIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
'get the new data
strPage = oIE.Document.body.innertext
Debug.Print strPage
'Cleanup
oIE.Quit
Set oIE = Nothing
End Sub
Based on another thread, I'm trying to suck down 36 hours of METAR data, parse the time and barometric pressure, and graph it so I have a really cheap graphing barometer
I'm stuck on the bold text- the data I'm seeing is the web page with the form, not the web page that comes up after the program clicks the button.
I verified with other code (that hooks into a visible IE page) that I am setting the parameters and the page is changing to one with data.
I'm missing a step here....what is it?
Thanks much!