Automate javascript Confirm("Submit?") through VBA

ramesh110289

New Member
Joined
Sep 7, 2016
Messages
1
Had a query while coding VBA in excel. I am working on automating the inputs given to a web page in IE and auto clicking the submit button to order reports.

I am ordering a report from a webpage (restricted access). I provide three inputs and press Submit button. The on click event of the submit button redirects to a js function (UISubmitButton()).

<input type="button" id="UI_SubmitButton" value="Submit" class="ReportUIButton" *******="UISubmitButton()">

Inside the js function the second line is confirm ("Submit?"). So when the dialog box pops up it just stays on. There is no way the focus is returning to the code.

function UISubmitButton() {
if (lProcessing == true) return;
lProcessing = true;

if (confirm("Submit?")) {....}

How can i click Ok by default from VBA?

Any pointers on how to automate this part would be really helpful.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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