1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Option Explicit
Private Sub Worksheet_Activate()
ActiveSheet.Calendar1.Visible = False
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Or Target.Column > 1 Then
ActiveSheet.Calendar1.Visible = False
Exit Sub
Else
With ActiveSheet.Calendar1
.Top = 13.5 * (Target.Row - 1) '13.5 si hauteur des lignes 14
.Left = Columns(1).Width
.Visible = True
End With
End If
End Sub
Private Sub Calendar1_Click()
ActiveCell = ActiveSheet.Calendar1.Value
ActiveCell.NumberFormat = "mm/dd/yy"
ActiveSheet.Calendar1.Visible = False
End Sub |