Hi all,
I am using arrays for a timer in one of the programs I am creating. I have a stop watch that starts counting when the timer is enabled.

I have three arrays:

lblTime(2) - for milliseconds
lblTime(1) - for seconds
lblTime(3) - for minutes

The problem is that when it comes to the part when the minutes have to be changed i.e. when 60 seconds occur... I get an error saying that lblTime(3) Array does not exist.

Here is the code I am using:

VB Code:
  1. Private Sub Timer_Timer()
  2.  
  3.     If Me.Enabled = True Then
  4.    
  5.         T2 = T2 + 1        
  6.         If T2 < 10 Then        
  7.             lblTime(2).Caption = "0" & T2            
  8.         Else        
  9.             lblTime(2).Caption = T2            
  10.         End If
  11.        
  12.         If T2 = 60 Then        
  13.             T2 = 0
  14.             T1 = T1 + 1            
  15.             If T1 < 10 Then            
  16.                 lblTime(1).Caption = "0" & T1            
  17.             Else            
  18.                 lblTime(1).Caption = T1            
  19.             End If            
  20.         End If
  21.        
  22.         If T1 = 60 Then        
  23.             T1 = 0
  24.             T0 = T0 + 1            
  25.             If T0 < 10 Then          
  26.                 lblTime(3).Caption = "0" & T0                
  27.             Else            
  28.                 lblTime(3).Caption = T0              
  29.             End If            
  30.         End If      
  31.     End If
  32.    
  33. End Sub

Any help would be appreciated...

Khanjan