- Try
- 'anything in here will try to execute
- IO.File.Move("c:\text.txt", "c:\renamed.txt")
- Catch ex As IOException
- 'if execution in the try fails, anything in here will execute
- MsgBox(ex.Message)
- Catch ex As Exception
- 'if execution in the try fails and is not an IOException, anything in here will execute
- MsgBox(ex.Message)
- End Try