Clicking Javascript Confirmation Button In Vba Script
The purpose of my code is to run a report on a website with specified criteria. I want to search for all of the 'distance' criteria, which prompts a message box asking if I'm sure.
Solution 1:
One way would be to override confirm
with execScript
:
Dim ie As Object, win As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate "https://stackoverflow.com"
Do While ie.Busy: DoEvents: Loop
Set win = ie.Document.parentWindow
win.execScript "window.confirm = function(){return true;};"
Post a Comment for "Clicking Javascript Confirmation Button In Vba Script"