Go Back   Access World Forums > Apps and Windows > Visual Basic

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-17-2017, 03:47 AM   #1
Fikus01
Newly Registered User
 
Join Date: Aug 2017
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Fikus01 is on a distinguished road
Vba file transfer help

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

Fikus01 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How Can I Transfer report to txt file goni07 Reports 4 11-29-2010 01:01 AM
Transfer CSV file with ado Wijklodewijk Modules & VBA 1 02-22-2008 09:38 AM
Automated file transfer candice General 2 01-17-2008 10:28 PM
Transfer Text File Name kidzmom3 Macros 2 09-11-2003 11:24 AM
File Transfer guv Modules & VBA 0 08-04-2000 07:01 AM




All times are GMT -8. The time now is 09:09 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World