help clicking link in VBA no ID

Martynrbell

New Member
Joined
Apr 11, 2016
Messages
35
Hey guys

Im trying to write somehint which fills in a webform for me from my excel file, I amamanaging to get the data i want into the fields however im struggling to click two buttons as the dont have an ID

The first one is:

input type="submit" name="terminal_group_search" value="Search"



The second one wants to click this link if it says company"

input type="submit" class="ActiveButton Clickable Accept Graphic" name="terminal_group_select[213423]" title="Select link to 'company" value=""



any ideas?

Thanks
Martyn
 
Last edited:

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
6,266
The easiest way is to submit the parent form element:
Code:
Dim HTMLdoc As HTMLDocument
Set HTMLdoc = IE.document  'assumes page is loaded in IE (InternetExplorer object)
HTMLdoc.forms(0).Submit 'assuming the input element is in the first (0th) form
 

Watch MrExcel Video

Forum statistics

Threads
1,099,029
Messages
5,466,116
Members
406,468
Latest member
Toto Li

This Week's Hot Topics

Top