Vba file transfer help (1 Viewer)


New member
Aug 17, 2017
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
MsgBox "Drive " & MyDrive & " has a disk and is ready!"
End If
End Sub

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom