ill do a code dump of all of it, but its erroring when i dont think it should be, as the array has enough slots for the request
the code is pretty straight forward, smilies show where the error is occuring, and i know that i dont need all the date variables im giong to remove them now..
Code:
Public Arrnumbervalue(5, 11, 30, 23) As String
Public Iday As Integer = Date.Now.Day
Public IMonth As Integer = Date.Now.Month
Public Iyear As Integer = Date.Now.Year
Public Ihour As Integer = Date.Now.Hour
Public IntMonth As Integer = IMonth
Public IntYear As Integer = Iyear
Public IntDay As Integer = Iday
Public IntHour As Integer = Ihour
Dim tmron As Boolean = False
Public tmrleft As Integer
Code:
Private Sub cbxHour_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxHour.CheckedChanged
If tmron = False Then
ddbDay.SelectedIndex = Iday - 1
ddbYear.SelectedIndex = Iyear - 2008
ddbMonth.SelectedIndex = IMonth - 1
ddbHour.SelectedIndex = Ihour - 1
tmrhour.Enabled = True
tmron = True
timerleft()
tmrhour.Interval = tmrleft
Else
tmrhour.Enabled = False
tmron = False
End If
End Sub
there is 4 of these
Code:
Private Sub cbxYear_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddbYear.SelectedIndexChanged
IntYear = ddbYear.SelectedIndex
textcheck()
End Sub
Code:
Public Function textcheck() As Process
Dim Int1 As Integer = Form3.IntHour
Dim Int2 As Integer = Form3.IntDay
Dim Int3 As Integer = Form3.IntMonth
Dim Int4 As Integer = Form3.IntYear
Dim Int11 As Integer = Form3.IntHour
Dim Int22 As Integer = Form3.IntDay
Dim Int33 As Integer = Form3.IntMonth
Dim Int44 As Integer = Form3.IntYear
:( Form3.txtNow.Text = Form3.Arrnumbervalue(Form3.IntYear, Form3.IntMonth, Form3.IntDay, Form3.IntHour) :(
Try
Form3.txtLast.Text = Form3.Arrnumbervalue(Form3.IntYear, Form3.IntMonth, Form3.IntDay, (Int1 - 1))
Catch
Try
Form3.txtLast.Text = Form3.Arrnumbervalue(Form3.IntYear, Form3.IntMonth, (Int2 - 1), 0)
Catch
Try
Form3.txtLast.Text = Form3.Arrnumbervalue(Form3.IntYear, (Int3 - 1), 0, 0)
Catch
Form3.txtLast.Text = Form3.Arrnumbervalue((Int4 - 1), 0, 0, 0)
End Try
End Try
End Try
Try
Form3.txtLater.Text = Form3.Arrnumbervalue(Form3.IntYear, Form3.IntMonth, Form3.IntDay, (Int11 + 1))
Catch
Try
Form3.txtLater.Text = Form3.Arrnumbervalue(Form3.IntYear, Form3.IntMonth, (Int22 + 1), 0)
Catch
Try
Form3.txtLater.Text = Form3.Arrnumbervalue(Form3.IntYear, (Int33 + 1), 0, 0)
Catch
Form3.txtLater.Text = Form3.Arrnumbervalue((Int44 + 1), 0, 0, 0)
End Try
End Try
End Try
End Function