Hello,

I put together a user control with two date pickers and labels. I am to set the labels text property and get the number of days between the date ranges. I have the code to do this, but when I test the control, the labels do not have the new text property. I haven't tested the date range portion yet. I have followed the steps in the text book on building the solution so that the control is available when using the form. Could someone let me know what I'm doing wrong with setting the label text? Here is my control code:

VB Code:
  1. Public Class DateRange
  2.  
  3.     Public WriteOnly Property PickUp() As String
  4.         Set(ByVal value As String)
  5.             Label1.Text = "PickUp Day"
  6.         End Set
  7.     End Property
  8.  
  9.     Public WriteOnly Property DropOff() As String
  10.         Set(ByVal value As String)
  11.             Label2.Text = "DropOff Day"
  12.         End Set
  13.     End Property
  14.  
  15.     Public ReadOnly Property GetDays() As String
  16.         Get
  17.             'Declare variables
  18.             Dim DayCount As Integer
  19.  
  20.             'Determine number of days
  21.             DayCount = CInt((DateDiff(DateInterval.Day, DateTimePicker1.Value, DateTimePicker2.Value)))
  22.  
  23.             Return CStr(DayCount)
  24.  
  25.         End Get
  26.     End Property
  27. End Class

Thanks