View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default Behaviour of Save as and Displayalerts

Hi Hari,
See the top of my Backup page, and you want to put the
date in the form yyyy-mm-dd or yyyy_mmdd something
that you can sort the directory on.
http://www.mvps.org/dmcritchie/excel/backup.htm

If the file might already exist and your intent is to overwrite it
the best thing to do is to delete the file and ignore the error
from deleting the file before creating the new backup file.
Then exception coding is hardly a concern. Your main concern
would probably be in creating the new file that the directory
you want to put it in already exists, once you have your directory
as indicated in the macro it should continue to work on and on.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Hari" wrote ...
I have a file by the name ABC format. I open this file and perform a couple
of operations through macros. At the end of the operation I want to save the
file by appending today's date in the format dd-mm-yy.