Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2005, 09:08 AM
Authorized User
 
Join Date: Dec 2004
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Default Closing an IE "OK" Dialogue box.

I am accessing a webpage where a Dialogue box initally appears with typical EULA info in it, with just an "OK" button on it. I'm trying to use Sendkeys to send an <ENTER> command so that the window will close and the webpage will continue to load. It's not working though. I think I might need to shift the focus to it? Anyone know how to close those annoying OK Dialogue boxes? Thanks!


Here's the script code that is causing me the problem:
Code:
<html>

<script>alert("        \xA9 1998 - 2005 Lewtan Technologies, Inc.\n\nThe information and data contained on this screen is derived from sources considered reliable, but Lewtan and its suppliers do not guarantee its correctness or completeness. 
The user is solely responsible for the accuracy and adequacy of any information used by it and the resultant output thereof, and Lewtan and its suppliers disclaim any and all liability therefore. 
Some information contained in ABSNet(tm) is also copyrighted (\xA9 1998-2000) by Standard & Poor's, a division of The McGraw-Hill Companies, Inc. 
While this information is based on sources considered reliable, neither Standard & Poor's nor its affiliates guarantees the accuracy, adequacy, or completeness of the information and they are not responsible for errors, omissions re results obtained from use of the information. 
Standard & Poor's receives compensation for ratings.   
Such compensation is based on the time and effort to determine the rating and is normally paid either by the issuers of securities 
or by the underwriters participating in the distribution thereof. 
The fees generally vary from $2,500 to $100,000. 
While Standard & Poor's reserves the right to disseminate the rating, it receives no payment for doing so, except for subscriptions to its publications.
\n\nIn the event that any of this data is exported for further use, this disclaimer must accompany it.")</script>
<head>
 
Old May 25th, 2005, 11:18 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

IE has a lot of protection built into it to prevent developers from manipulating the user's browser.
I don't think you are going to be able to do this.
 
Old May 27th, 2005, 09:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 173
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hi there,

Not sure if you've figured this stuff out by yourself yet but thought I'd add my two pennies worth. I should add that I've had to teach myself most of the same sort of stuff you seem to be in the process of figuring out. Its not documented anywhere and its a bit frustrating.

Brian, whilst you are correct in that IE has in-built protection to stop programmatic simulation of click events I did find a way round this sort of problem. Essentially you need to determine the co-ordinate location of the ok button on the screen and then use WinAPI calls to move the mouse over the button and click on it for you. I wrote about all of this in an earlier post, should you care, its at http://p2p.wrox.com/topic.asp?TOPIC_ID=21528

Hope this helps,
Maccas
 
Old May 27th, 2005, 10:01 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Maccas,

That post referenced describes how to “animate” accessing a web page.
But it sounds like what Ahrenl is encountering is an alert(), which is modal.

I suspect (s)he will still have trouble. I hope Ahrenl will report back on successes/failures...
 
Old May 27th, 2005, 10:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 173
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Apologies then.

It appears I'm a little out of my depth here...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Run Dialogue Box mr_kane VB.NET 10 November 27th, 2007 12:43 PM
How to open a dialogue box maximized Pete Bone Visual C++ 0 October 10th, 2007 06:23 AM
Open the "Open File" dialogue box piratelordx Access VBA 4 March 14th, 2006 10:08 PM
Open Print dialogue box vladimir Access VBA 7 September 21st, 2004 08:46 AM
Get rid of that nasty parameter dialogue box gzuhlke Crystal Reports 1 July 29th, 2003 10:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.