Hi Again

I have a file list
with 2 backup library

    For i = 0 To File2.ListCount - 1
    If File2.Selected(i) Then

     min = Left$(File2.fileName, 12) ' here I got the file name from PhoneTel.mdb130513_2014.mdb

     '********** min is Phonetel.mdb

   Kill App.Path & "\phonetel.mdb"

    sourcefile1 = File2.Path & "\min" ' The sourcefile1 path is right - tel\backup\backup
                                      ' and "min" should be PhoneTel.mdb 

    destinationfile1 = App.Path & "\phonetel.mdb"

    FileCopy sourcefile1, destinationfile1

I have tried everything but now I am stocked

Where do I the wrong thing.

Recommended Answers

Your problem could be here: sourcefile1 = File2.Path & "\min" your using min as a string constant isntead of a variable. Try this: sourcefile1 = File2.Path & "\" & min

Jump to Post

You'll have to show the exact wording of the error and the line it occurs on.

Jump to Post

All 5 Replies

Your problem could be here: sourcefile1 = File2.Path & "\min" your using min as a string constant isntead of a variable. Try this: sourcefile1 = File2.Path & "\" & min

Hi

I have tried that to and now the source file is right but

now it stops at destinationfile1 and say no file

You'll have to show the exact wording of the error and the line it occurs on.

I fixed it

I fixed it

If you already fix it then please share with us the solution. Your answer will help another members who has same problem like you. Also make this thread as Solved.

Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.