1 Answer 1

1

You said,

this is a deadlocks for me because 1) i trigger the prompt from excel to retrieve data from server 2) the server is stop responding until prompt is being dismissed 3) all codes coded to handle prompt not being processed because excel still waiting for the #1 to complete

I made a tests with some suggestions in older threads, but nothing worked.

References of those older threads.

(1) Disable Alert message of a webpage using VBA code (Refer the second answer)

(2) vba to dismiss an IE8 or IE9 "message from webpage" popup window

The thing is that, VBA code execution get stops when IE display the Alert() message. As code execution is already stopped we are not able to handle the Alert() prompt using code. So user need to close the Alert() prompt manually which resumes the code execution.

For simplicity in testing, if you just try to create an IE object and display the prompt and put some other lines of code after the prompt than you will notice that execution of code get stopped when prompt get displayed and until you close the prompt manually further lines of code will not get execute.

I agree with the suggestion given by the Zhi Lv - MSFT in your referenced thread for using the Selenium Web driver.

It can be the easiest solution for this issue.

References:

(1) Selenium Web Driver

(2) Selenium handle alerts prompts confirmation popups

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.