>yes sorry I meant to say never returns 4 not .t.
You have to check the return code for other possible termination values as well; I didn't put any error handling or other stuff in, as it was just meant to be example code. You can find the set of constants for the InternetExplorer.Application ReadyState in the MSDN documentation.