When the form first loads there are two global variables (assigned values in the form load sub as a default) that set the number of days back in time and how many days ahead events will be displayed (in an array of labels). If the user wants to view more events (or less events) the number of labels displayed (and the text they contain) will change. I have one sub (code below)that creates an array of labels.
What I can't seem to do is find a way to blow them off the form and "re-instantiate" as many as I need for the new user selectable range.
Any and all ideas are welcome and appreciated.Code:Private Sub CreateDisplayLabels() Dim lblEvent(1000) As Label Dim I As Integer For I = 0 To DisplayCounter - 1 lblEvent(I) = New Label With lblEvent(I) .Name = CStr(I) : : End With Me.Controls.Add(lblEvent(I)) AddHandler lblEvent(I).Click, AddressOf Label_Click Next I End Sub




Reply With Quote
