skeeeter56
New Member
- Joined
- Nov 26, 2016
- Messages
- 42
- Office Version
- 2019
- Platform
- Windows
I am designing a sheet which has a table on a sheet, it has a number of columns, 2 of which are for inputting dates.
I am trying to get it so that when you click cell pop calendar appears select date and this in placed into cell.
I can get it to work with the below code for each column, but I am trying to combine so that when either cell in either column is clicked the calendar pops up and inserts date in cell clicked.
I hope this is possible
I am trying to get it so that when you click cell pop calendar appears select date and this in placed into cell.
I can get it to work with the below code for each column, but I am trying to combine so that when either cell in either column is clicked the calendar pops up and inserts date in cell clicked.
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'If Not Intersect(Target, Me.ListObjects("March22").ListColumns(1).DataBodyRange) Is Nothing Then
'Call Calendar.SelectedDate(ActiveCell)
If Not Intersect(Target, Me.ListObjects("March22").ListColumns(6).DataBodyRange) Is Nothing Then
Call Calendar.SelectedDate(ActiveCell)
End If
End Sub