• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel 2010...Date and save issue

thaohaitrieu9

New Member
Hi, I am using excel 2010. I am using a sheet with the =Today() function which is fine when I initially open the sheet. Is there a way that when I re-open the sheet (next day or next week, next month) that I can stop the date from updating to the current date?
Also I have a workbook with six sheets. One of the sheets is an invoice form and once the invoice is raised I would like to save this invoice sheet only to another workbook. Is this possible in excel?
Thanks for your help
 
Try using the Google Custom Search box at the top right of this page
Search for Date Stamp
 
Hi Thaohaitrieu,
Firstly welcome to the forum...

Not sure about your first requirement:
=Today() function will return the date of today, every time you open the file it will show current day's date.

2nd question:
yes it can be done, try the following code:

Code:
Sub SaveAsWorksheetAndDeleteMacro()
Dim ws As Worksheet
    Sheets(Array("Sheet1", " Sheet2", " Sheet3")).Copy
        With ActiveWorkbook
        For Each ws In .Worksheets  
        Next
        .SaveAs ThisWorkbook.Path & "\Invoice " & Format(Date, "dd mmm yy") & Format(Time, "h mm ss"), FileFormat:=51  '.xlsx format
  
  
    End With

End Sub

If you dont need all three sheets, remove them.
Regards,
 
Hi, I am using excel 2010. I am using a sheet with the =Today() function which is fine when I initially open the sheet. Is there a way that when I re-open the sheet (next day or next week, next month) that I can stop the date from updating to the current date?
Also I have a workbook with six sheets. One of the sheets is an invoice form and once the invoice is raised I would like to save this invoice sheet only to another workbook. Is this possible in excel?
Thanks for your help
Hi,

Not really, that formula is dynamic and will update. You can enter the current date in a cell by holding down the CTRL key and tapping ; and that date won't update.

To save a worksheet as a workbook you can use this code. Change the sheet name to the correct one.

Code:
Sub somesub()
Dim wb As Workbook
Sheets("Sheet1").Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Somename"
End With
End Sub
 
Back
Top