Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 0.42 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Try
  2.             'anything in here will try to execute
  3.             IO.File.Move("c:\text.txt", "c:\renamed.txt")
  4.         Catch ex As IOException
  5.             'if execution in the try fails, anything in here will execute
  6.             MsgBox(ex.Message)
  7.         Catch ex As Exception
  8.             'if execution in the try fails and is not an IOException, anything in here will execute
  9.             MsgBox(ex.Message)
  10.         End Try