I'm trying to logon to a customer website using vba. I can call up the website and automatically enter the username and password but I need to know the name of the command button so that I can tell the code to press it. Here is the code that I used to get the field names for the username and password;-
For Each oHTML_Element In HTMLDoc.getElementsByTagName("input") Debug.Print oHTML_Element.Name Next
Now (presumably) all I need to know is what is the tag name for listing command buttons or is there any other command that I could use to get the elements of the web form?
never mind. I re read the quetion and worked it out:
The login button was actually running a javascript routine which I've managed to do with the following command;-
Call oBrowser.Document.parentWindow.execScript("ValidateLogin(frmLogin)", "JavaScript")