0

My macro uses Internet Explorer to open PeopleSoft Financials and then run a public query. It has been working for a long time until recently. I'm aware of an update to Internet Explorer on our machines in early July and am wondering if that has caused this issue.

The macro is throwing an "Object has disconnected from its clients" error message.

Here is how the variable for Internet Explorer is defined: Public ExpApp As InternetExplorer

Here is the code where the error is thown:

Set ExpApp = CreateObject("InternetExplorer.Application")
ExpApp.Visible = True

ExpApp.navigate vLogin

Do Until ExpApp.readyState = READYSTATE_COMPLETE   ' ERROR IS THROWN HERE
MyTimer
Loop

Do Until ExpApp.document.Title <> "PeopleSoft 8 Sign-in"
MyTimer
Loop

Do Until ExpApp.readyState = READYSTATE_COMPLETE
MyTimer
Loop

vLogin is a string with the URL to the PeopleSoft login screen MyTimer is a little function that waits 1 second each time it is kicked off

This macro has been around a while so I imagine that this is pretty old code. I'm hoping there are a few minor changes I could make instead of re-writing this macro.

Any suggestions would be greatly appreciated. Thanks for the help......

Shaves
  • 884
  • 5
  • 16
  • 46
  • 1
    Can you use `While ExpApp.Busy Or ExpApp.ReadyState <> READYSTATE_COMPLETE: DoEvents: Wend` – nishit dey Aug 23 '17 at 14:45
  • 1
    @nishitdey...........thanks. that got me past the error until I hit the next ExpApp line. I'm afraid I'm going to have to re-write this macro. Thanks for your help – Shaves Aug 23 '17 at 15:12
  • 1
    Try to play with variations of IE [compatibility](https://www.google.ru/search?q=ie+compatibility+mode&tbm=isch), [browser](https://www.google.ru/search?q=ie+browser+mode&tbm=isch) and [document](https://www.google.ru/search?q=ie+document+mode&tbm=isch) modes. Also take a look at [this](https://stackoverflow.com/a/23232573/2165759) and [this](https://stackoverflow.com/a/41595471/2165759) answers. – omegastripes Aug 23 '17 at 17:59
  • Something is closing before the script can finish. I run into this occasionally when I close an IE window manually and my script is designed to close the window for me. Sometimes I have to set the delay to 3, 4, or 5 seconds to allow a page to fully load, before moving on. – Mitch Aug 24 '17 at 00:08

0 Answers0