ReadyState check not working in IE11


New Member
Nov 23, 2013
I had automated an internal application (IE) in my company using excel macro. In the code i have used readystate property of the document object to determine whether the page is loaded or not. Now when I upgraded my IE to IE11, ready state function is not working. When googled came to know that property is removed from IE1 onwards. Not able to find any alternative for ready state. Requesting your help.

As the application is in my companys intranet, not possible to paste the URL.

Piece of code am referring to is updated below. In that ReqResWindow is the IE Object and DocObjReqRes is a document object.

Set DocObjReqRes = ReqResWindow.Document
DocObjReqResReadyState = DocObjReqRes.ReadyState
Loop Until DocObjReqResReadyState = "complete"

Some videos you may like

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.


Active Member
Apr 29, 2010
try this if it work .....
While DocObjReqResReadyState.Busy
        Application.Wait Now + TimeValue("0:00:1")
        GoTo DoRepeatLoop


New Member
Mar 12, 2019
Hi, I have found a solution to this, not sure if others would recommend it but i found that with some pages, when you log into a page, the do until readystate_complete doesn't work. I have used the below and it works perfectly, I hope it helps you and others looking for a solution!

On Error Resume Next
If htmldoc.getElementById("myaccountpage:filterForm:searchFilterText").placeholder <> "filter on bill, property, meter & spids" Then
Application.Wait (Now + TimeValue("00:00:01"))
GoTo wait1
End If

to explain, it is looking for a certain element on the loaded page(once you have logged in), and will keep looping until it finds it, it used the 'on error resume next' function to bypass the error it throws up when it can't find the ID, it will only continue when it finds that ID (when the page has loaded)

to explain my dims:

dim IE as internet explorer
dim htmldoc as HTMLDocument
set htmldoc = ie.document

i have used the 'get elementbyID but i'm sure it will work with getelementbyclassname or other get element functions.

the .placeholder refers to text within text box HTML of that ID below:

<input name="myaccountpage:filterForm:searchFilterText" id="myaccountpage:filterForm:searchFilterText" style="width: 40%;" onkeydown="if(event.keyCode==13){return false;}" type="text" <u=""> placeholder="filter on bill, property, meter & spids">

I do hope my explanation helps others with this issue as i couldn't find a solid answer anywhere, I had to come up with this myself!
Last edited:

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...