unactive workbook name

B

bob

how would i handle renaming an unactive workbook in a repeating loop.
the first pass through a macro creates a book and when macro is repeated a
2nd book is created. if there are 2 book added i want to rename activebook
"new" and the prior book i want to rename "old" .
after working with 2 books the macro is repeated; delete old, rename "new"
as "old" and next activebook added name "new"

thanks
 
B

BrianB

Something like :-
Application.DisplayAlerts = False
Workbooks("New.xls").SaveAs FileName:="Old.xls"
ActiveWorkbook.SaveAs FileName:="New.xls"
Application.DisplayAlerts = True

Regards
BrianB
================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top