Forum Discussion
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 from one cell to another on the workbook. When I manually enter Today's date, the data entry works as normal. No drag at all.
Please help with a VBA code to prompt the user to enter Today's date on Sheet5(Code Name) in Cell J3 whenever they open this workbook.
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
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_SIRATIron Contributorthank you Hans.
It works.