ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I move files From Drive to drive using VBA (https://www.excelbanter.com/excel-programming/321090-can-i-move-files-drive-drive-using-vba.html)

Jeff

Can I move files From Drive to drive using VBA
 
I would like to move and rename files automatically whenever someone finishes
with the spreadsheet. The idea is that they can only run it once and the data
files are moved until the next month, and ready for the next department to
use them.

Jim Thomlinson[_3_]

Can I move files From Drive to drive using VBA
 
Sure you can but be careful because inevitably someone will mess things up
and indicate that they are finised when they are not. You will want to
validate completeness before you move the files. Even then files are going to
be moved prematurely (you can always trust end users to foul up the
infallible). That having been said look up "file system objects" as that is
probably what you are looking for based on your question. The microsoft site
is a pretty good reference on this topic.

HTH

"Jeff" wrote:

I would like to move and rename files automatically whenever someone finishes
with the spreadsheet. The idea is that they can only run it once and the data
files are moved until the next month, and ready for the next department to
use them.


Dave Peterson[_5_]

Can I move files From Drive to drive using VBA
 
Take a look at Name in VBA's help.

Also FileCopy and Kill may be useful one day.

Jeff wrote:

I would like to move and rename files automatically whenever someone finishes
with the spreadsheet. The idea is that they can only run it once and the data
files are moved until the next month, and ready for the next department to
use them.


--

Dave Peterson


All times are GMT +1. The time now is 08:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com