Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some code that looks for and opens a file from location A, processes
and closes the file. I now need to move the file from location A to location B (with the same name). I have read up on the posts here and have looked at Excel Help and Ron de Bruin's website (http://www.rondebruin.nl/folder.htm), but it still doesn't work. This is what I currently have..... MyPath = "C:\RECEIVED\" NewPath = "C:\PROCESSED\" ...........some code to put all the files in the path (MyPath) into an array.......... Set mybook = Workbooks.Open(MyPath & MyFiles(Fnum)) Filename = mybook.Name newname = NewPath & Filename ...........some more code to do all the processing.......... mybook.Close savechanges:=False Name mybook AS newname and...no good. The file still remains in the original location and is not moved. I have tried the above line to look like...FileCopy mybook.name, newname and even FileCopy mybook.fullname, newname and still no good. Any help is greatly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CODE 4 MOVING WITHIN A RANGE-TAB | Excel Discussion (Misc queries) | |||
VB code for Moving Rows up and down | Excel Programming | |||
Moving files via code | Excel Programming | |||
Import VBA Code in Excel-File ? (Export VBA Code to file) | Excel Programming | |||
Moving Code | Excel Programming |