ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,726
- Office Version
- 2007
- Platform
- Windows
I am once again having issue with dates.
On my userform i have a datepicker which shows the current date
I send the userform values to worksheet BUT the date i see in the cell is 08/05/2024
In another cell on my worksheet it also does the same if i type a date out,example 04/07/2024 changes to 07/04/2024
Along with other issues i have OCD & like this to be in capitals.
The issue with the date toggles when i add / remove this code below.
Without it the date is fine.
Add the code & date changes.
On my userform i have a datepicker which shows the current date
I send the userform values to worksheet BUT the date i see in the cell is 08/05/2024
In another cell on my worksheet it also does the same if i type a date out,example 04/07/2024 changes to 07/04/2024
Along with other issues i have OCD & like this to be in capitals.
The issue with the date toggles when i add / remove this code below.
Without it the date is fine.
Add the code & date changes.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Dim Cell As Range
Set rng = Intersect(Target, Range("A2:L" & Rows.count))
If Not rng Is Nothing Then
Application.EnableEvents = False
For Each Cell In rng
Cell = UCase(Cell)
Next Cell
Application.EnableEvents = True
End If
End Sub