Difficulty analysing Journey Planner result
In message of Thu, 22 Oct 2009
16:15:23 in microsoft.public.excel.programming, Walter Briscoe
writes
[snip]
I have not found out how to cause buttons to be clicked from VBA.
I have not found out how to click a button but HAVE found out how to run
the button code.
Dim ButtonText As String
Dim RE As Object
Set RE = CreateObject("VBScript.RegExp")
' Grab the code the button runs
RE.Pattern = "(.|\n)*href=.(.*)..View.*$"
ButtonText = RE.Replace(Tbl.innerhtml, "$2")
' s/&/&/g
RE.Pattern = "&"
RE.Global = True
ButtonText = RE.Replace(ButtonText, "&")
' Prefix the site
IE.Navigate2 "http://journeyplanner.tfl.gov.uk/user/" & ButtonText
I will continue by analysing the result of that navigation.
--
Walter Briscoe
|