'Make sure you import "Imports System.IO"
   Dim openFileDialog1 As OpenFileDialog
Try
   If OpenFileDialog1.ShowDialog <> DialogResult.Cancel Then
      File.Copy(OpenFileDialog1.FileName, TextBox1.Text & "\" & _
OpenFileDialog1.FileName.Substring(OpenFileDialog1.FileName.LastIndexOf("\")))
   End If
Catch e As Exception
   MsgBox("Error: " & e & " while coping file from " & TextBox1.Text)
End Try


One of my favorite Book on Visual Basic Programming

 
SGoogleearch for more Code Samples   

Copyright 2004-2009 Excalibur software Solutions All rights reserved
Note: Any unsolicited email sent to Excalibur Software Solutions or any members of Excalibur Software Solutions, will be archived and a fee of $5.00 dollars US per email per month will be charged to the content owner of said email. The Content Owner must inform Excalibur Software Solutions in writing; they no longer require archive services for each email archived within 30 days of cancelation. The content holder is defined as the entities represented in email regardless of sender. The sender is the representative of the content holder.