Delete a file...
Posted by Mark Gravelle on November 16, 2001 12:15 PM
I'm at the final stage of my program and cant figure out this last step.
I have 2 directories "Pending" & "Billed". The macro opens the file directory listing for "pending" and waits for the user to select a file. The rest of the macro will take this file, work with it,and "SaveAs" to the "Billed" directory.
Question: I want to "kill" the original file that was selected in the "Pending" directory. But I don't know what file they will select, as the file was originally saved as (ThisFile=Range("H3").value...etc.) and the file is retrieved by ( FileToOpen=Application_[...].GetOpenFilename[...]Workbooks.Open Filename:=FileToOpen). Do you know how I can do this? Or maybe a rename command? But I can't rename an open file.