Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1") = "date" Then ' type the word date in cell A1 of sheet 2 the below validation will appear in cell A2
With Range("A2").Validation ' location of where you want the list of dates picker to be
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=Sheet1!$A$1:$A$28" ' location of where your date list is
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Else
Range("A2") = ""
Range("A2").Validation.Delete
End If
End Sub
so this part of the code in the example show the date picker to be in A2 in sheet 2. If I understand your request simply change the "A2" to where you want the Date Picker to beWith Range("A2").Validation ' location of where you want the list of dates picker to be
Sorry I am not familiar with how to locking ActiveX Control. That would be a different request from the original Post. Might want to suggest that you create a new request with that specific request hopefully someone else that knows will help out.Gotcha, so I think we might be referring to two separate things in terms of "date picker". I'm referencing the MS Date and Time Picker Control 6.0 that you add through the Developer tab. When that ActiveX Control is added, it's just a free moving control, I can't attach it to a specific cell; unless there is a way to do that and I haven't figure it out yet lol.
You can close this thread.Sorry I am not familiar with how to locking ActiveX Control. That would be a different request from the original Post. Might want to suggest that you create a new request with that specific request hopefully someone else that knows will help out.
Did the vba posted help you to hide the date picker. Were you able to modify to show the Picker.