Through use of the code below, VB successfully waits for a page with frames to finish loading. While still in the same public sub, if I wanted to navigate to another link I would use the same bit of code minus the first line 'Set objIE'. My problem is that my code sprouts off to another public sub and when I try to tell IE to navigate some where else using the code below minus the first line "Set objIE = New INternetExplorer" I end up getting a 'Runtime error 424 - object required'.
So I insert the first line "Set objIE = New InternetExplorer" and another (not visible) instance of IE sprouts and navigates to the location. I don't want another instance of IE loading, visible or not. I don't want to close out the IE window since that will cause me to have to log back into the webpage. I even tried "Set objIE = InternetExplorer" WITHOUT the 'New' so I could keep using the existing IE window but VB didn't seem to like that idea. I've tried to search for some word to use that would mean "Current" instead of "New" but I can't find anything.
Set objIE = New InternetExplorer
objIE.Visible = True
While objIE.readyState <> READYSTATE_COMPLETE
Dim objHTML As HTMLDocument
Set objHTML = objIE.document
While objHTML.readyState <> "complete"