The following code opens the calendar if the date in the active cell is formatted as with that in the code.
How could the code be changed so that it opens the calendar form when the user formats the active cell with the system's short date format.
Any help on this would be appreciated.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'check cells for desired format to trigger the calendarfrm.show routine
'otherwise exit the sub
Dim DateFormats, DF
DateFormats = Array("d/mm/yyyy;@")
For Each DF In DateFormats
If DF = Target.NumberFormat Then
If CalendarFrm.HelpLabel.Caption <> "" Then
CalendarFrm.Height = 191 + CalendarFrm.HelpLabel.Height
Else: CalendarFrm.Height = 191
CalendarFrm.Show vbModeless
End If
End If
Next
End Sub
How could the code be changed so that it opens the calendar form when the user formats the active cell with the system's short date format.
Any help on this would be appreciated.