Rename a workbook!

A

aiyer

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
 
T

Tom Ogilvy

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).
 
Top