Forum Discussion
A_SIRAT
Aug 07, 2022Iron Contributor
TODAY FORMULA VBA
I have a Ageing Analysis workbook where I am using TODAY() formula on cell J3 of Sheet 5 to fetch the current date which will help calculate Overdue days. However, there is a delay when entering data...
- Aug 07, 2022
You don't need a prompt - the code can enter today's date automatically:
In the Visual Basic Editor, in the Project Explorer pane on the left, double-click ThisWorkbook under Microsoft Excel Objects.
Copy the following code into ThisWorkbook:
Private Sub Workbook_Open() Sheet5.Range("J3").Value = Date End Sub
HansVogelaar
Aug 07, 2022MVP
You don't need a prompt - the code can enter today's date automatically:
In the Visual Basic Editor, in the Project Explorer pane on the left, double-click ThisWorkbook under Microsoft Excel Objects.
Copy the following code into ThisWorkbook:
Private Sub Workbook_Open()
Sheet5.Range("J3").Value = Date
End Sub
A_SIRAT
Aug 07, 2022Iron Contributor
thank you Hans.
It works.
It works.