Hello, everyone! First time caller, long time listener.
I'm automating a number of weekly reports by using VBA to populate data from an intranet site (via Internet Explorer) into Excel 2003. I am an intermediate user and just ran into something to which I cannot find a solution online.
Current Process:
(1) Navigate to site (2) Use Regular Expressions to extract first set of data into Excel (3) Make changes to page (via buttons and input fields).
Problem:
I've got a handle on nearly everything but in Step (3), IE has a MessageBox popup that asks for confirmation before I deleted some data. That is, I click on a button to clear the items...
... and then the Message Box appears, with options "OK" and "Cancel", and I need to hit "OK". Since it's technically not a New Window, I don't think I need to worry about Shell scripts. I can't seem to set any code after this because the Message Box forces user input before continuing.
Just in case, the code on the HTML page has the following line for the button...
... but I can't touch any of the JavaScript that's included (company no-no).
What are my options? Can I use keystrokes to mimic pushing the "OK" button? Would I set a timer that could keep checking to see if the Message Box has popped up and to hit "OK"? Thanks in advance for any insight!
- Angelo
I'm automating a number of weekly reports by using VBA to populate data from an intranet site (via Internet Explorer) into Excel 2003. I am an intermediate user and just ran into something to which I cannot find a solution online.
Current Process:
(1) Navigate to site (2) Use Regular Expressions to extract first set of data into Excel (3) Make changes to page (via buttons and input fields).
Problem:
I've got a handle on nearly everything but in Step (3), IE has a MessageBox popup that asks for confirmation before I deleted some data. That is, I click on a button to clear the items...
Code:
IE.Document.getelementbyid("clearRelItems").click()
Just in case, the code on the HTML page has the following line for the button...
HTML:
<INPUT TYPE=BUTTON NAME=clearRelItems ID=clearRelItems VALUE="Clear List" *******="add_rel_items_to_box(0);">
What are my options? Can I use keystrokes to mimic pushing the "OK" button? Would I set a timer that could keep checking to see if the Message Box has popped up and to hit "OK"? Thanks in advance for any insight!
- Angelo