*Using HTML Object library with vba *(CAS is set as Browser instance (shdocvw))
Set HTMLDoc = CAS.document.frames(\"MainFrame\").document \'pull the main fra
If you wanted to wait for a specific element:
Dim el As Object
Do
Set el = Nothing
On Error Resume Next
Set el = CAS.document.frames("MainFrame").document.getElementById("idHere")
On Error GoTo 0
DoEvents
Loop While el Is Nothing
You probably want to build in a maximum wait time though, so you don't loop endlessly if for some reason the element never appears.