Solved

Coding for Calendar control in VB 6

Posted on 2004-08-30
3
174 Views
Last Modified: 2010-05-02
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.
0
Comment
Question by:mwmiller78
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
DarkoLord earned 500 total points
ID: 11934484
Hi... Put this on frmDate:

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

Darko
0
 

Author Comment

by:mwmiller78
ID: 11934524
You're awesome...Thanks!!!
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11934547
You're welcome
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question