There are two methods for this...
Both involve using the "event" for the control.
1) If using a calendar control (standard Excel/windows calendar), the
"click" event should be sufficient. When the user clicks on the
calendar (date button of a specific month), the value (properly
formatted) can be posted to a label or text box.
2) if using a dropdown list, populate the list with dates and then
using the "change" event, populate the label or the text box.
Examples below:
where the main userform is called "InputChildAge" and contains a label
to hold the date called "Label1"
1) using a separate calendar
Private Sub Calendar1_Click()
InputChildAge.Label1.Caption =
Format(InputChildAge.Calendar1.Value, "MMMM DD, YYYY")
End Sub
2) using a dropdown...
Private Sub ComboBox1_Change()
InputChildAge.Label1.Caption =
Format(InputChildAge.Dropdown1.Value, "MMMM DD, YYYY")
End Sub
--
weavtennis
------------------------------------------------------------------------
weavtennis's Profile:
http://www.excelforum.com/member.php...fo&userid=3634
View this thread:
http://www.excelforum.com/showthread...hreadid=514128