Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Changing filenames using theSaveAsCopy method

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filenames ending with :1 and :2 djn Excel Discussion (Misc queries) 7 January 14th 10 04:01 PM
Please post this thread a correct full method, method about Nast Runsome New Users to Excel 8 February 25th 08 03:29 PM
Please post this thread a complete correct method, method about te Nast Runsome New Users to Excel 0 February 23rd 08 09:42 PM
Changing Calculation Method Simon Palmer Excel Programming 2 November 26th 03 06:01 PM
Method 'Run' of object '_Global' failed when changing OS and Office versions Ronj Excel Programming 2 August 17th 03 06:12 PM


All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"