Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy files using VBA

Status
Not open for further replies.

jwkolker

Programmer
Jan 9, 2003
68
US
Hi:

I often use the rename command in an msaccess module to move files but can't for the life of me remember how to copy files - I need to run a number of routines that depend on files being copied from various parts of the server to a local drive before the routines occur.

What is the vba for copy to - source - destination?

I can't find any info about it in access - I do NOT want to continue doing it manually nor do I want to use a .bat file since it will run outside my linear logic path and other processes will not wait for the call to finish.

Any help is greatly appreciated.

JK

John Kolker
Programmer
jwkolker@comcast.net
 
John,
If you want to use OOP, check out the FileSystemObject. It will do any of the file moving/copying/whatever that you need to do.

You will need a reference to the "Microsoft Scripting Runtime" in your module.

Good Luck,
Tranman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top