Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Process control chart for quality control in exel? | Charts and Charting in Excel | |||
2007 Form Control/ActiveX Control font difference | Excel Discussion (Misc queries) | |||
Excel spin box - no Control tab in Format Control dialong box | Excel Worksheet Functions | |||
Difference between a Forms Control verus Active-X Control | Excel Discussion (Misc queries) | |||
Calendar Control: Can't exit design mode because control can't be created | Excel Programming |