Changing the name of a Workbook??

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Hi All,

Is it possible, with VBA, to change the name of a workbook?
I know you can use the saveas function to do this, but I
would like to make the change without saving the file,
then print the file and then, depending on whether the
printed copy was acceptable or not, save the file. I've
got it all working except the name-change....any help
would be appreciated.

Don
 
The name of a workbook comes when you save it.

Maybe you could use .savecopyas within your macro.

Then if the printed copy is ok, keep that workbook--if it's not ok, look at Kill
(in VBA's help) to delete it.

But if you use .savecopyas, you actually save a copy of the workbook you're
working in--the workbook that you're in doesn't change and isn't saved.

If you want, you can open that .savecopyas file, but if you don't open it, it's
just sitting there on disk.
 
Back
Top