I `m having a problem with VB as was wondering if you could help..
I`ve created a FTP- ish program to copy data from a specified location and paste it into another.
This works fine with a single selection but for multiple selections it only copies the last file..
i`m using an array to hold all the values that are selected but it doesn`t seem to bE recognising anything other than the last one.
this is the code i`m using:
filFilebox is the filebox with the selected files to transfer
dirDirBox is the name of the source directory box
dirDirBox2 is the name of the target directory box
Private Sub TransferFile_Click()
Dim item As Variant
Dim A As Variant
A = Array(filFileBox)
item = filFileBox.FileName
For Each item In Array(filFileBox)
filname = dirDirBox.Path & "\" & filFileBox.FileName
destpath = dirDirBox2.Path & "\" & filFileBox.FileName
Progress.Text = "Source: " & filname & " Destination: " & destpath
FileCopy filname, destpath
Call filFileBox2.Refresh ' repaint the FileBox
what`s going on?!?!?!?!?!?