venu
You will need to set up your workbook to 'spin' off a new workbook at a set time. Your original workbook will need to have an OnTime setting to fire your necessary code, so enter
Sub FireAtCertainTime()
Application.OnTime TimeValue("23:00:00"), "Firecode"
End Sub
This will then fire the FireCode code snippet (in your originating workbook too) that will open your file (change YourFilename to whatever you have), print it and then close it with the file name yyyymmdd.xls. it then closes the workbook and re-runs the FireatCertainTime code ready for the next day at 11pm
Sub FireCode()
Dim wb As Workbook
Set wb = Workbooks.Open("YourFilename")
With wb
.PrintOut
.SaveAs Filename:="YourFilePathAnd" & "\" & Year(Now()) & Month(Now()) & Day(Now()) & ".xls"
.Close
End With
Set wb = Nothing
FireAtCertainTime
End Sub
Regards
Nick Hodge
Microsoft MVP, Excel
Southampton, UK