Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
IE code
hi,
i have the following. its pretty unpredictable in that it works sometimes and sometimes not. for example, i noticed that it mostly works if i click the button and then go directly to hover over the opened IE window. ...... 'Make IE navigate to the URL and make browser visible myIE.navigate myURL44 myIE.Visible = True 'Wait for the page to load Do While myIE.Busy Or myIE.ReadyState < READYSTATE_COMPLETE DoEvents Loop 'Set IE document into object Set myDoc = myIE.document SendKeys "gggg.xls" Do While myIE.Busy Or myIE.ReadyState < READYSTATE_COMPLETE DoEvents Loop SendKeys "{TAB}" SendKeys "{TAB}" SendKeys "{TAB}" SendKeys "{TAB}" 'SendKeys "{TAB}" SendKeys "{ENTER}" End Sub how can i make sure this code is more robust and works every time. perhaps there is a way to move focus to the IE window or something? thanks in advance, geebee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating excel file, adding code to it from code, VBE window stays | Excel Programming | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
How can I modify my code to offset the defined range and repeat theprocedure instead of duplicating my code? | Excel Programming | |||
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does | Excel Programming | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming |