Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Rename a workbook!

Hi all!

A quick question.Here is what I am trying to do.

Name of the original workbook changed in the middle of certai
operations/tasks performed by some macros. So I want to rename th
workbook back to the orginal name and at the same time, i DO NOT wan
to save the changes made/done in the sheet/workbook till then and kee
the workbook still open, so that I can repeat the macros again an
again before finally closing the workbook manually.

I tried the following but evidently could'nt use it, as it closes th
sheet.

activeworkbook.close savechanges:=false

Any help would be appreciated guys.

Thanks.

Arun,
Vtec Corp

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Rename a workbook!

There should be no reason to use the name of the workbook.

Use ThisWorkbook to refer to the workbook containing the code. Use
ActiveWorkbook to refer to the active workbook.

The only way to change the name of a workbook is to save it using that name
and Save As. If you save it, you accept all changes (but they are saved in
the newly named workbook and the original remains unchanged).

--
Regards,
Tom Ogilvy


"aiyer " wrote in message
...
Hi all!

A quick question.Here is what I am trying to do.

Name of the original workbook changed in the middle of certain
operations/tasks performed by some macros. So I want to rename the
workbook back to the orginal name and at the same time, i DO NOT want
to save the changes made/done in the sheet/workbook till then and keep
the workbook still open, so that I can repeat the macros again and
again before finally closing the workbook manually.

I tried the following but evidently could'nt use it, as it closes the
sheet.

activeworkbook.close savechanges:=false

Any help would be appreciated guys.

Thanks.

Arun,
Vtec Corp.


---
Message posted from http://www.ExcelForum.com/



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
How to rename workbook that I am editing without saving? [email protected] Excel Discussion (Misc queries) 1 March 23rd 08 04:00 PM
How to open a new workbook and rename the workbook? pokdbz Excel Discussion (Misc queries) 3 December 26th 07 03:37 PM
rename a group of spreadsheets in a workbook bob Excel Discussion (Misc queries) 1 October 2nd 07 05:21 PM
How do I loop through workbook and rename all chart titles? Backpaddler Excel Programming 1 January 23rd 04 11:04 PM
Workbook, worksheet rename PW[_2_] Excel Programming 0 September 4th 03 12:34 PM


All times are GMT +1. The time now is 07:53 AM.

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"