• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

HTML Submit Button not executing in Macro

webmax

Member
Hi
I have following html code when i execute the macro code First Name, Last Name working fine but the submit button is not executing. Submit Button not clicking
Can you check the below macro code and guide what are the changes to made in the macro code for submit button

HTML Code

<html>
<body>
<h2>HTML Forms</h2>
<form action="">
First name:<br> <input type="text" name="firstname"> <br>
Last name:<br> <input type="text" name="lastname"> <br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
Macro Code

Code:
.getElementsByName("firstname")(0).Value = ThisWorkbook.Sheets("Data").Range("A1").Value
    .getElementsByName("lastname")(0).Value = ThisWorkbook.Sheets("Data").Range("B1").Value
    .getElementsByName("submit").Click

Regards
Shahul
 
Last edited by a moderator:
Hi !​
Can you check the below macro code and guide what are the changes to made in the macro code for submit button
Nope as we are not mind readers without any access to the webpage !​
Try to submit the form instead of any button …​
 
Back
Top