Vba file transfer help (1 Viewer)

Fikus01

New member
Local time
Today, 15:38
Joined
Aug 17, 2017
Messages
9
Hi everyone. I'm a bit of a newbie to vba and access in general but it is making sense and I've made good progress, I am however stuck on this point.

I'm trying to put a filecopy after something similar to the code I have used below and I was hoping to use the mydrive or mydrivedir to specify the from location being from a USB stick to he computer.

Any help would
Be appreciated and I will keep working on it in the meantime.

Sub Test1()
Dim MyDrive$, MyDriveDir$
MyDrive = "D"
On Error Resume Next
MyDriveDir = Dir(MyDrive & ":", 5)
If MyDriveDir = "" Or IsError(MyDriveDir) Then
MsgBox "No disk is in Drive " & MyDrive
Else
MsgBox "Drive " & MyDrive & " has a disk and is ready!"
End If
Err.Clear
End Sub
 

Users who are viewing this thread

Top Bottom