I've got the following code. there are two Do Until... Loop in it. Is it illegal to have two of them? coz it's ok when I have only one of them my program hangs when I have two.

Code:
Private Sub Command1_Click()
    Webbrowser1.Navigate "http://www.abc.com./hello.asp"
    Do Until Webbrowser1.ReadyState = READYSTATE_COMPLETE
        DoEvents
    Loop

    SendKeys "{tab 8}"
    SendKeys "andy"    'input the search string to the text box
    SendKeys "{enter}" 'this "enter" submit the form and brings up another asp
    
    Do Until Webbrowser1.ReadyState = READYSTATE_COMPLETE
        DoEvents
    Loop
    Web1.SetFocus
End Sub