Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Web Browswer Control

What I'm trying to do is navigate through a series of web
pages (displayed on the WebBrowser Control on an Excel
sheet). Sometimes data is entered and sometimes a button
is just selected.

What I'm looking for is code that will allow the macro to
move on once the page has been completely loaded. (I'm
trying the DocumentComplete event but I don't have the
syntax right yet.)

Here is a sample of what I am trying to do:

Dim IElem As HTMLInputElement
Set WebDoc = Worksheets(1).WebBrowser1.Document

For Each IElem In WebDoc.forms(0).elements

Select Case IElem.Name
Case "PrincipalName"
IElem.Value = ShopNum
End Select

Next IElem

intReadyState = 0

Worksheets(1).WebBrowser1.Navigate "javascript:validate
(document.keyForm);"

(Note: below is my attempt to cycle through a loop until
the ReadyState = 4) at which point the macro would move on
to the next statement. Once ReadyState = 4, we assumed
that it meant the page had finished loading. However, it
just keeps cycling through the loop until I use CTRL +
Break.)

Do While Not intReadyState = 4
intReadyState = WebDoc.ReadyState
Loop

intReadyState = 0

(Note: this is the point where I am looking for code that
will allow the macro to continue once the page has loaded.)

Thanks for suggestions....JT

Reply
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
Process control chart for quality control in exel? Kara Charts and Charting in Excel 2 May 11th 10 05:45 PM
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
Excel spin box - no Control tab in Format Control dialong box tocoau Excel Worksheet Functions 7 August 10th 08 03:15 PM
Difference between a Forms Control verus Active-X Control funGT350 Excel Discussion (Misc queries) 6 May 6th 08 11:20 PM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM


All times are GMT +1. The time now is 06:30 PM.

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

About Us

"It's about Microsoft Excel"