SOLVED

TODAY FORMULA VBA

Iron Contributor

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. 

2 Replies
best response confirmed by A_SIRAT (Iron Contributor)
Solution

@A_SIRAT 

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
thank you Hans.
It works.
1 best response

Accepted Solutions
best response confirmed by A_SIRAT (Iron Contributor)
Solution

@A_SIRAT 

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

View solution in original post