HazySmoke)345 wrote:
The thing is that, as my program bumps into an error, it stops no matter what, even if there's the "On Error Goto" statement.
The problem is that you call Clipboard.Clear again in the error handling, and this has a good chance of causing another error. You can't handle errors when error handling.
If all you want to do is retry until it's free, you wouldn't have to do anything inside your error handling at all - just use Resume to try the line which caused the error again. However, this could cause an infinite loop if the other application really doesn't want to let go of the clipboard.