Changing filenames using theSaveAsCopy method

D

davidoo2005

Here's the problem: I would like to open a file, for instance C:\Documents and Settings\Me\Folder1\file.xls, perform some basic operations, and save it as C:\Documents and Settings\Me\Folder2\file.xls. How can I alter the filename in such a way?
 
F

Frank Kabel

Hi
in your macro use the .saveas method. e.g. try something like the
following:
sub foo()
dim wbk as workbook

workbooks.open "C:\Documents and Settings\Me\Folder1\file.xls"
set wbk=activeworkbook
'perform your stuff
wbk.saveas "C:\Documents and Settings\Me\Folder2\file.xls"
end sub
 
Top