If you are using any kind of loop, you can have a Boolean Variable, and check to see if it is True. If it is then stop the loop with Exit For or Exit Do or something.
Thats just about the only way unless you are using the Web Browser Control or the Inet Control, then you can just do.