Coding for Calendar control in VB 6

I have a form name frmReport it has a text field named txtDate. It also has a button that, when clicked, opens a form called frmDate. frmDate has the MS calendar control 8.0 component on it. What I would like to do is when a user opens frmDate and clicks on a particular date, frmDate will close and the selected date will appear in txtDate on frmReport. How can I do this. Thanks.
Mike MillerSoftware EngineerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
DarkoLordConnect With a Mentor Commented:
Hi... Put this on frmDate:

Private Sub Calendar1_Click()
     frmReport.txtDate = CStr(Calendar1.Value)
     Unload Me
End Sub

Darko
0
 
Mike MillerSoftware EngineerAuthor Commented:
You're awesome...Thanks!!!
0
 
DarkoLordCommented:
You're welcome
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.