G
geebee
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
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