LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Web interaction

Hi All,
The following code (test) is being set up to establish a web link, I have
the following question about the code if anyone can help much appreciated.

1. How can I test if the internet explorer object is open / ready ? - for
example I create the ie object and then quit ie and set ie to nothing is
there a way of testing if the object exists, eg

If ie then
do this
else
do this
endif

2. On another note is it valid to test if the ie object exists before it is
created?

3. The 'wait for response' could wait a long time, how can I set a limit on
the time ? Does the Do Events statement inside the loop allow me to have
another userform control event activate, such as a cancel button to force
the ie activty to stop

TIA
Cheers
Nigel


Sub WebLink()

Set ie = CreateObject("InternetExplorer.Application")
MsgBox "IE Created"

sURL = "http://www.foo.com"

ie.Navigate sURL

'wait for response
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

'close ie and remove memory references
ie.Quit
Set ie = Nothing

End Sub




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Curious interaction W/Win Exp. Jim H. Excel Discussion (Misc queries) 6 August 5th 08 09:38 PM
Macro interaction C Brandt Excel Discussion (Misc queries) 5 May 2nd 07 10:00 PM
ASP Excel interaction Gabe Excel Discussion (Misc queries) 0 September 7th 06 01:26 PM
... interaction with Word ... Dr. Darrell Excel Discussion (Misc queries) 2 July 21st 05 10:42 PM
UserForm Interaction Bob Phillips[_5_] Excel Programming 0 September 22nd 03 08:12 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"