Save file path problem with FileCopy

I need to backup the database i use with my windows form application.  Im have written the following code:
   
Private Sub UltraButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton3.Click
        Dim DBPath As String = My.Application.Info.DirectoryPath

        FileCopy(DBPath & "C:\Users\Database.accdb", "?")

        MsgBox("Backup Successful")

My problem is the user selects the path to backup and that path goes into textbox1.  How do i get the FileCopy function to use this path?
koldjgAsked:
Who is Participating?
 
hnasrCommented:
Try this example:

FileCopy (TextBox1.Text, "D:\NewLocation\Database.accdb")

If Textbox1 does not include the database name then:

FileCopy (TextBox1.Text & "\Database.accdb", "D:\NewLocation\Database.accdb")
0
 
koldjgAuthor Commented:
Wicked, Thanks a lot.
0
 
hnasrCommented:
Welcome!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.