please look at the code beloow and tell my what i have to do, questions follow the code........
Public Sub form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Data.GetFormat(vbCFFiles) Then Text1.Text = Data.Files(1)
FileCopy Text1.Text, "c:\windows\desktop\"
End Sub
the question is. when i drag a file onto the form i want it to copy straight to the address given,in this case it windows\desktop, the problem i have is i dont know how to get the file name in data.files(1) to copy the file so it will be the same name and extension,is there a way to to tell the for that the file name is the string to the right of the last backslash (\).
thanks
james cuttance
Public Sub form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Data.GetFormat(vbCFFiles) Then Text1.Text = Data.Files(1)
FileCopy Text1.Text, "c:\windows\desktop\"
End Sub
the question is. when i drag a file onto the form i want it to copy straight to the address given,in this case it windows\desktop, the problem i have is i dont know how to get the file name in data.files(1) to copy the file so it will be the same name and extension,is there a way to to tell the for that the file name is the string to the right of the last backslash (\).
thanks
james cuttance