View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Changing filenames using theSaveAsCopy method

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


--
Regards
Frank Kabel
Frankfurt, Germany


davidoo2005 wrote:
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?