IE.navigate not working on VPN

30knotwind

New Member
Joined
Apr 5, 2012
Messages
23
My code has been working for a full year on XP, MSIE8, Cisco AnyConnect (VPN). We recently migrated to Win7 and did not have trouble to begin with, but after a couple months it now never works on the VPN. It is giving me this error:

"The Object Invoked has disconnected from its clients" when it reaches the Do loop.

If I take out the Do loop, it gives me the same error when it gets to the next line of code, which inserts data into a form on the webpage.

The code always works without issues when I am off the VPN.

I have tried everything from lowering security settings to saving passwords, etc.

Any help appreciated!
Chris

Code:
Code:
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")

'webpage to be edited
comment_url = ActiveWorkbook.Sheets("Comment").Range("M24").Value

IE.Navigate comment_url  'load web page

Do
DoEvents
Loop Until IE.readyState = 4

'    READYSTATE_UNINITIALIZED = 0
'    READYSTATE_LOADING = 1
'    READYSTATE_LOADED = 2
'    READYSTATE_INTERACTIVE = 3
'    READYSTATE_COMPLETE = 4

Call IE.Document.getElementById("edit-field-trader-open-0-value-datepicker-popup-0").SetAttribute("value", pos_date)
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Only just received this notification June 2nd. !!

With anything related to the Internet or file servers apart from connection speed we are at the mercy of the traffic volume at the time - so you might find your code still works outside peak times. In some scenarios such as screen updating problem is often that the code runs too fast. Try experimenting with time delays like this code which forces the code to stop for 10 seconds at a time. At least you will know that something is happening. :cool:

Code:
t = 0   ' counter
Do
    Application.StatusBar = t
    Application.Wait Now + TimeValue("00:00:10") ' wait 10 seconds
    t = t + 10
    DoEvents
Loop Until IE.readyState = 4
Application.StatusBar = "Connected"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,436
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top