By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,997 Members | 1,470 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,997 IT Pros & Developers. It's quick & easy.

Using the MonthView Control But Cannot Update the Text Field on Another Form

P: n/a
I am writing a program that allows user to select the date in
a calendar, and it will update the text fields automatically.

I created 2 forms. The first form has 2 text fields (start date and
end date), and 2 buttons. When the user clicks the button, it will
invoke the calendar form. Here's the code fragment for the first form:

Private Sub Command1_Click()
Dim instanceCalendarForm As CalendarForm
Set instanceCalendarForm = New CalendarForm
End Sub

Public Sub setTextDate(aDate As String)
startText.Text = aDate
End Sub

The second form contains the MonthView activeX control. I am not sure
if I can invoke a MonthView control without putting in on another form.
Any ideas? Here's the code fragment for the second form:

Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
startDate = MonthView1.Month & "/" & MonthView1.Day & "/" &
instanceForm1.setTextDate (startDate)
End Sub
The problem is I cannot update the text field in form1 even the user clicks
date on calendar control. Any ideas?? Please advice. Thanks!!!


Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

"John Davis" <jr*******> wrote in message

Please pick a technology and stick with it. The .NET folks don't want VB6
questions any more than we in the *.vb.* groups want .NET questions. In
other words, please don't crosspost between *.dotnet.* and *.vb.* groups.
Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.