• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to click on pop up box in internet explorer using vba

jagu143

New Member
hi,

need help to click on message from website (ok/cancel) window in internet explorer using excel vba. Thank you!

* sendkeys not working as code get stuck once the popup window get opened.

regards,
jagui
 
Last edited:

Hi,

no problem with SendKeys if synchronized …

Other way for very beginner in VBA / Web is to cut the code in two pieces :
one before message and after manual click, the other part …
 
There are a number of posts here in the forums about using Internet explorer with VBA to access forms

Try using search first
 
hi,

i searched it and i didnt get the answer for my problem.

marc- the tool wont be use full for me if divide the code. because i need to click on the specific button more than 200 times if i start clicking on the message box manually. if there is any solution which i can avoide the message from the message box?

regards
jagu
 

Use for example Wait function to synchronize VBA with IE
just before using SendKeys and IE must be visible …​
 
Last edited:
Hi Jagu,

you need to run another macro based file with different instance of excel, that will also run along with your current macro tool.

This macro file to be coded based on windows APIs to catch the class of this popup and dismiss the same.

Unforunately, I do not have the code for the same.

Regards,
Prasad DN.
Note: Usually, Windows APIs based macro would not work in citrix environment due to non availability of required authorization.
 
you need to run another macro based file with different instance of excel, that will also run along with your current macro tool.
Why another instance expect to waste ressources ?!

I never had to do that, works in current Excel session,
needs just to pause VBA until IE - worse & slowest way - comes …
 
Hi Marc,

I understand what you are suggesting, but I had a situation where the pop up of IE will not get recognized by the running macro. And the IE page will not proceed until the pop up is dismissed, and the Macro will also keep waiting without proceeding further, even if you code wait until page is not buzy will not get executed. The moment someone manually dismiss that pop up, the macro continues.

the only workaround that worked for me is to capture that popup window class and dismiss using another instance of excel that keeps a constant check to see if any such pop up appears.

Regards,
Prasad DN
 

Maybe it's your IE version, I use v9 (best) and v10 …

The running macro in fact runs faster than IE, so you have to wait for IE,
like I already wrote just synchronize VBA with IE …

But if your way works, not a concern for me !

And like Hui wrote, many samples on the Web …
 
Back
Top