Tanyaann1995
Board Regular
- Joined
- Mar 24, 2021
- Messages
- 62
- Office Version
- 2016
- Platform
- Windows
Hi,
I have a code below that finds the most recent date in a list and displays it.
VBA Code:
Sub dateshow()
Dim max As Date
max = Application.WorksheetFunction.max(Columns("A"))
MsgBox CDate(max)
End Sub
My list of dates is below. But, when i try the above code, the message box displays 12:00:00 AM. Please advise why.
I have a code below that finds the most recent date in a list and displays it.
VBA Code:
Sub dateshow()
Dim max As Date
max = Application.WorksheetFunction.max(Columns("A"))
MsgBox CDate(max)
End Sub
My list of dates is below. But, when i try the above code, the message box displays 12:00:00 AM. Please advise why.
16-Jul-2020 |
23-Jul-2020 |
23-Jul-2020 |
23-Jul-2020 |
08-Dec-2020 |
07-Jan-2021 |