Automation - Clicking button in IE

AdrianPH

New Member
Joined
Oct 4, 2017
Messages
3
Hi,

I've seen this same question posted on this forum as an avid viewer but I can't seem to relate any of the answers to my HTML so I'm looking for some help.

Below is my HTML.

HTML:
<img class="hand" type="image" name="addNewJobImage" src="images/btn_add.gif" alt="Add Job" *******="addJob('new'); return false;">

and below is my current VBA:

Code:
Sub LoadInternet()
Dim url As String
Dim ele As Object

    Set ie = New InternetExplorerMedium
 
    ' You can uncoment Next line To see form results
    ie.Visible = True
    url = Sheets("Setup").Range("B9")
    ie.navigate url

    Application.StatusBar = "Please wait..."
 
    ' Wait while IE loading...
    Do While ie.Busy
        Application.Wait DateAdd("s", 1, Now)
    Loop
    
 'Call firstpage

 FillInputBox "input", "SCHEME_TITLE", "TESTEST"

 FillInputBox "input", "A1141", "TEST1141"
 
 FillInputBoxAfter "select", "PLANNING_SOURCE", "UNK", i
 
 FillInputBoxAfter "select", "JOBSOURCE", "OTHER", i
 
 FillInputBoxAfter "select", "JobType", "31", i
 
 FillInputBox "input", "CRD", Sheets("Sheet1").Range("B8")
 
 FillInputBox "input", "TaskRequiredByDate", Sheets("Sheet1").Range("B8")
 
 FillInputBox "input", "JOBNUM", "TEST"


'automation for clicking add button



Set goBtn = ie.document.getElementById("proceedImage")
goBtn.Click

End Sub

Can anybody please help me automating this based on the above HTML.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,223,162
Messages
6,170,432
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top