The exception message I am receiving is this...
"Year, Month, and Day parameters describe an un-representable DateTime."
Now I've traced my values being passed and everything is correct. Values loops through 1 to 12 but still I continue to receive an exception. Only way I can avoid this is by throwing a Try, Catch statement around where I'm passing over the value. Now I'm un settling with this as a solution so I'd prefer to figure this out and fix it rather than over looking it with a try, catch.
Here's my code..
Code:001 Dim Calendar(11) As AppointmentBookControl.AppointmentBookControlMonthlyOverviewCalendarControl 002 003 For i As Integer = 0 to Calendar.GetUpperBound(0) 004 Calendar(i) = New AppointmentBookControl.AppointmentBookControlMonthlyOverviewCalendarControl 005 006 Me.CalendarContainer.Controls.Add(Calendar(i)) 007 With Calendar(i) 008 .BackColor = Color.White 009 .Width = [Region].Width-16 010 .Location = New Point(8, 8+i*(.Height+8)) 011 .Month = i+1 012 .Name = "CalendarControl" & i.ToString() 013 End With 014 Next i
Line '011 .Month = i+1' is where the problem is located. The values for (i+1) maintain within the bounds of 1 through 12.. yet still cause an issue.
Any help would be greatly appreciated.![]()





Reply With Quote
