countryfan_nt
Well-known Member
- Joined
- May 19, 2004
- Messages
- 765
Hello friends, Hope all is well! Please help me adjust the below code.
I want after choosing an item on the userform, the chosen result to be placed on cell F15, instead of K15.
Thank you very much in advance!
I want after choosing an item on the userform, the chosen result to be placed on cell F15, instead of K15.
Thank you very much in advance!
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim dt As Variant
Dim InitialDate As Date
If Target.Address = "$K$15" Then
dt = ShowCalendar("Double Click on the selected date", InitialDate)
If Not IsEmpty(dt) Then
Target.Value = CDate(dt)
End If
Cancel = True
End If
End Sub