Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Cancel As Boolean
Dim DateFormats, DF
DateFormats = Array("m/d/yyyy", "dd mmmm yyyy")
On Error GoTo fim
If Target.Value = "" Then
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
Cancel = True
End If
End If
Next
End If
fim:
End Sub
Postado : 24/04/2018 4:44 pm