A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Setting up and Configuration
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Changing the name of a Workbook??



 
 
Thread Tools Display Modes
  #1  
Old September 18th, 2004, 04:08 PM
Don
external usenet poster
 
Posts: n/a
Default Changing the name of a Workbook??

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
  #2  
Old September 18th, 2004, 07:22 PM
Dave Peterson
external usenet poster
 
Posts: n/a
Default

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.



Don wrote:

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


--

Dave Peterson

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dates changing when copying worksheet to new workbook Heather Worksheet Functions 3 August 25th, 2004 02:09 AM
Changing Default location of Personal.xls macro workbook? PhilDean General Discussion 4 June 23rd, 2004 08:37 AM
Changing multiple reference links from one workbook to another jlane Worksheet Functions 1 March 18th, 2004 02:55 PM


All times are GMT +1. The time now is 02:22 AM.


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