Adding Date Easily With Calendar Control
In our template, the date column is Column I (column 9).
If you select a cell in the Column I, the calendar will popup and when you click on the calendar the date will be placed in the active cell.If you select a cell outside the Column I the calendar will disappear.
To appear and to hide of the "calendar control" is provided with Vba Codes :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Column
Case Is = 9 'Column No
Sheets("Data1").Calendar1.Visible = True
evnsatırı = ActiveWindow.ScrollRow
For i = 1 To evnsatırı
evngelbenimle = evngelbenimle + Cells(i, 1).Height
Next i
ActiveSheet.Shapes("Calendar1").Left = 490 'Left Margin
ActiveSheet.Shapes("Calendar1").Top = evngelbenimle - 12 'Top Margin
Case Else
Sheets("Data1").Calendar1.Visible = False
End Select
End Sub
To appear and to hide of the "calendar control" is provided with Vba Codes :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Column
Case Is = 9 'Column No
Sheets("Data1").Calendar1.Visible = True
evnsatırı = ActiveWindow.ScrollRow
For i = 1 To evnsatırı
evngelbenimle = evngelbenimle + Cells(i, 1).Height
Next i
ActiveSheet.Shapes("Calendar1").Left = 490 'Left Margin
ActiveSheet.Shapes("Calendar1").Top = evngelbenimle - 12 'Top Margin
Case Else
Sheets("Data1").Calendar1.Visible = False
End Select
End Sub