View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default Saving worksheet in new file with date AND cell value as file name


To solve number 1 you can use

ActiveSheet.Name = "Acme " & Application.Substitute(Date, "/", "-")

The substitute function is a devise to remove the slash characters
which are illegal in sheet names.

For the second you can use

Thisworkbook.close

You may need to precede this with

Thisworkbook.saved = True

to avoid the dialog box asking if you want to save changes.


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=545980