Have you already shown your OpenFileDialog?
Sample:
~
Dim ofp As New OpenFileDialog
ofp.Filter = "Access Databases (*.mdb)|*.mdb"
If ofp.ShowDialog( Me) = DialogResult.OK Then
File.Copy(ofp.F ileName,
Path.Combine(Ap plication.Start upPath, "wasa.mdb") , True)
MessageBox.Show ("You restored a backup: " &
Path.GetFileNam e(ofp.FileName) )
Else
MessageBox.Show ("User doesn't want to restore a backup!")
End If
~
Roman
"Webbyz" <ma*******@gmai l.com> ???????/???????? ? ???????? ?????????:
news:11******** *************@g 49g2000cwa.goog legroups.com...
I used the code and I imported System.IO and here is the error I got..
An unhandled exception of type 'System.Argumen tException' occurred in
mscorlib.dll
Additional information: Empty file name is not legal.
What's up with that?