One of the major suppliers of planning software to the United Kingdom is a company called Idox Group plc. They produce probably the most popular back office software that runs all aspects of administering planning permission. As such their public access web pages usually have the same fundamental structure. What if rather than holding information about a planning application you would like to create a command button that would take the user directly to the planning application details.
Unfortunately the url bears no relation to the planning application reference so it is necessary to go to a search page enter the planning application number and then trigger search which if you have a completely accurate planning reference will take you to the individual record. Here’s a function for City of Edinburgh Council complete with relevant application number. Previously I had achieved this using AHK but here is an elegant solution using VBA code. As ever there are multiple ways to achieve the same thing.
Public Function GotoWebPage() Dim ie As Object Dim strapplication As String strapplication = "18/00488/TCO" Set ie = CreateObject("Internetexplorer.application") ie.Visible = True ie.navigate "https://citydev-portal.edinburgh.gov.uk/idoxpa-web/search.do?action=simple&searchType=Application" While ie.busy DoEvents Wend ie.Document.getElementbyID("simpleSearchString").Value = strapplication ie.Document.Forms(0).submit End Function
And here’s one for City of London Council
Public Function GotoWebPageCityLondon() Dim ie As Object Dim strapplication As String strapplication = "18/00152/FULEIA" Set ie = CreateObject("Internetexplorer.application") ie.Visible = True ie.navigate "http://www.planning2.cityoflondon.gov.uk/online-applications/search.do?action=simple&searchType=Application" While ie.busy DoEvents Wend ie.Document.getElementbyID("simpleSearchString").Value = strapplication ie.Document.Forms(0).submit End Function
Further useful reading
How to Navigate IE using VBA