Solved

URGENT! VB.NET -- Need to get MonthCalendar value for TextBox.Text property

Posted on 2013-01-18
2
2,327 Views
Last Modified: 2013-01-19
Hello everyone,

I need to extract a date value from a MonthCalendar object and set it to the TextBox1.Text property.

Is this possible?

This is how I want to utilize the MonthCalendar:
=======================================

TextBox1.Text = MonthCalendar1._______________

I often use a DateTimePicker in these cases, but the client wants the MonthCalendar instead.
=====================================================================

TextBox1.Text = DateTimePicker1.Value.ToString("mm/DD/YYYY")


Thanks!
0
Comment
Question by:eq2006
2 Comments
 
LVL 16

Assisted Solution

by:terencino
terencino earned 250 total points
ID: 38795748
Hi what about
MonthCalendar1.SelectionStart.ToShortDateString

Open in new window

0
 
LVL 10

Accepted Solution

by:
Monica P earned 250 total points
ID: 38795937
TextBox1.Text = MonthCalendar1.SelectionStart.ToShortDateString

Private Sub MonthCalendar1_DateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateChanged
        ' ---- Show the slected date.
      TextBox1.Text = MonthCalendar1.SelectionStart.ToShortDateString
    End Sub
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

820 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