View Single Post
  #4   Report Post  
Abeer Abeer is offline
Junior Member
 
Posts: 1
Default

Hi, Is there any way to move the files even if they are open? I am specifically working on excel files. There is a button in the file and the code checks the name and moves all excel files that have that keyword as part of the filename and move it to a different folder. The code works except for the open files. Can you please help? I tried to use the Name function, Copy and Kill, Move, and nothing worked with open files.

I appreciate the help ... Thanks

Quote:
Originally Posted by Dave Peterson View Post
Look up Name in VBA's help.

Or even FileCopy and Kill.

These options will work if that file (doesn't have to be an excel workbook)
isn't open.

tvt wrote:

Hello,

I want to write a macro that takes an existing excel file (workbook) and
place it in another folder. Basically something that would simulate cutting
a file from one folder and pasting it in another. Is this possible using
VBA? If it is, what would be the code or where can i find the code to do so?
Thanks!


--

Dave Peterson