I am trying to use VBA to click on a Java script button on the following website: http://www.ura.gov.sg/realEstateIIWeb/transaction/search.action
I'm trying to get the vba to select a project and then click on the button labelled Add and then the button labelled search in the web link above.
I have managed to get the VBA to open the website and select the project, but some how I am unable to get the VBA to click on the "Add" button and "Search" button
Sub DLDATA()
Dim MAS As Object
Dim STYR As Object
Dim DLD As Object
Dim XLD As Object
Dim form As Variant, button As Variant
Set MAS = CreateObject("InternetExplorer.application")
With MAS
.Visible = True
.Navigate Sheets("Property Value").Range("B30").Value ' Navigate to website
Do Until .ReadyState = 4
DoEvents
Loop
Set STYR = MAS.Document.all.Item("projectNameList")
STYR.Value = Sheets("Property Value").Range("A1").Value ' Select name of property based on name in cell A1.
Set XLD = MAS.Document.all.Item("addOpt")
XLD.Value = Sheets("Property Value").Range("A1").Value
End With
End Sub