SamarthSalunkhe
Board Regular
- Joined
- Jun 14, 2021
- Messages
- 103
- Office Version
- 2016
- Platform
- Windows
Hi All,
I am using below code to check Date format in cell but, I am getting error as Overflow.
Can some one check confirm me where I am updating wrong code.
I am using below code to check Date format in cell but, I am getting error as Overflow.
Can some one check confirm me where I am updating wrong code.
VBA Code:
Dim UserEnteredDate As Date
Dim CurrentDate As Date
UserEnteredDate = Format(Mid(Sheet3.Cells(5, 7), 2, 2) & Mid(Sheet3.Cells(5, 7), 2, 2) & Right(Sheet3.Cells(5, 7), 4), "DDMMYYYY")
CurrentDate = Format(Now(), "DDMMYYYY")