MrBart67
New Member
- Joined
- Nov 9, 2021
- Messages
- 3
- Office Version
- 2019
- Platform
- Windows
Hello,
I need help with saving an Invoice Workbook which contains the "Today()" function using a Macro.
The Active Workbook (Invoice) has the "Today()" function in Cell B14. Auto Calculate is active so whenever I open the Workbook todays date is displayed. So far so good
I have 3 Macro's that can save the Active Workbook to different file types according to the 'Status' of the Invoice.
2 of them save the Workbook to PDF and work fine. The third Macro saves the Workbook As a Copy to a different folder.
Sub SaveInvoiceOpen()
Dim NewFN As Variant
' Copy Invoice to a New Workbook
ActiveWorkbook.SaveCopyAs Filename:="X:\RON\Facturen\Open\Factuur-" & Range("B15") & Range("C15").Text & ".xlsm"
Range("C15").Value = Range("C15").Value + 1
Range("A7:A12").ClearContents
Range("A18:F32").ClearContents
Range("B38:B40").ClearContents
End Sub
Question: Is it possible to change Cell B14 to show the date as text upon saving the Workbook to a new file? But Cell B14 has to remain the "Today()" function in the Active Workbook.
What I want in the Saved Copy is to remain the date to the date the file was created.
Thanks in advance and please feel free to reply with any question?
I need help with saving an Invoice Workbook which contains the "Today()" function using a Macro.
The Active Workbook (Invoice) has the "Today()" function in Cell B14. Auto Calculate is active so whenever I open the Workbook todays date is displayed. So far so good
I have 3 Macro's that can save the Active Workbook to different file types according to the 'Status' of the Invoice.
2 of them save the Workbook to PDF and work fine. The third Macro saves the Workbook As a Copy to a different folder.
Sub SaveInvoiceOpen()
Dim NewFN As Variant
' Copy Invoice to a New Workbook
ActiveWorkbook.SaveCopyAs Filename:="X:\RON\Facturen\Open\Factuur-" & Range("B15") & Range("C15").Text & ".xlsm"
Range("C15").Value = Range("C15").Value + 1
Range("A7:A12").ClearContents
Range("A18:F32").ClearContents
Range("B38:B40").ClearContents
End Sub
Question: Is it possible to change Cell B14 to show the date as text upon saving the Workbook to a new file? But Cell B14 has to remain the "Today()" function in the Active Workbook.
What I want in the Saved Copy is to remain the date to the date the file was created.
Thanks in advance and please feel free to reply with any question?