VBA IE Automation: Previously functioning "Click" now redirects to error page

Benzoli7

Board Regular
Joined
Jan 11, 2010
Messages
136
Hi Everyone,

I'm new to creating any type of IE automation and I'm hoping someone can point me in the right direction to solve this.

I built a tool to automate repetitive filling of a few webforms that I have to do frequently. Everything about the tool worked until last week.

Now, when the tool executes the line below, the site redirects to a page to page that tells me the link no longer works/the page no longer exists. If I manually click the button that this line clicks, I get the desired result. I suspect the page detects that a human is not clicking the button, and then redirects to the "error" page.

Assuming my suspicion is correct, does anyone know how to solve this or know of any helpful resources? I know that I barely know anything about this and I'm completely open to feedback saying my assumption is wrong (insert "assumption" joke haha).

I've searched a bunch for solutions, but haven't found anything. Not sure if I'm even asking the right question.

Quick note: I'm hesitant to share many more code snippets or details about about the site. I'm hoping that knowing that everything used to work and everything but this line still works provides enough detail to point me in the right direction.

Thanks in advance for any help you can provide!

VBA Code:
doc.getElementsByName("save")(0).Click
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
i would expect that the html has been changed at the other end, so the save button is no longer call 'save' in the source html
 
Upvote 0
i would expect that the html has been changed at the other end, so the save button is no longer call 'save' in the source html
Thanks Diddi!

By "at the other end" do you mean some place other than what is visible when I inspect the html? I just double checked the html and the button I'm trying to press is
HTML:
name="save"

Would another identifier be better? Example: is it possible to click a tabindex?
 
Upvote 0
are you able to post your code including the url? i use a different method for interacting with web pages which may be applicable in your context and be more stable. IE automation is a bit dodgy tbh, especially as IE has not been updated for years and some sites do not behave very well.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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