I am using the InternetExplorer object to interact with a web page, filling out a form and all that. At one point, after clicking a button on a page a Dialog box pops up asking to confirm the operation. How do I click the OK button in the popup?
The relevant JavaScript and HTML is:
function CheckMakeCurr()
{
if(confirm('Are you sure you want to set the\n "Last Rebalance Date" to today?'))
{ return true; }
else
{ return false; }
};
...
<INPUT onclick="return CheckMakeCurr()" class=button type=submit value="Make Current" name=updaterebaldt>
The Excel vba code is:
Dim oInput As IHTMLInputElement
' Initialize oInput.
...
' Click oInput.
oInput.click
' The confirm box comes up. What now?