PDA

View Full Version : Save by Cell Value



sivadnitram
09-15-2008, 01:59 PM
Good evening
I am using Office 2003 and Windows XP. I have a workbook with the following recorded macro:-

Sub SAVEANDEND()
'
' SAVEANDEND Macro
' Macro recorded 9/15/2008 by Martin
'
'
Sheets("FOREPIECE").Select
ActiveWorkbook.Save
ActiveWorkbook.Close

This macro can be triggered from any one of 3 pages. As you can see it takes the focus back the the sheet FOREPIECE, saves the workbook (under its current file name). On the sheet FOREPIECE cell H6 is the current day and date derived from the =TODAY() function.

What I am trying to do is save the workbook as the value of H6.

Any help would be gratefully appreciated,

sivadnitram

Bob Phillips
09-15-2008, 02:01 PM
Sub SAVEANDEND()
ActiveWorkbook.SaveAs Format(Date,"yyyy-mm-dd")&".xls"
ActiveWorkbook.Close