Or take a different approach that works correctly. See Message #
1604613 and #1604612
>I have an application that creates an internetexplorer.application and navigates to several different web sites to capture the innerHTML. On some of these sites I get a JavaScript alert() message. How do I programmatically click the OK button or the form close X on the alert box?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer