[attach]22534[/attach] 作者: 浩雨 时间: 2007-1-9 11:15
Option Compare Database
Option Explicit
Dim I As Integer
Dim J As Integer
Private Sub Form_Load()
I = 0
For J = 0 To 9
Me("Label1(" & J * 3 & ")").ForeColor = &HFF& '红色
Me("Label1(" & J * 3 + 1 & ")").ForeColor = &HFF00& '绿色
Me("Label1(" & J * 3 + 2 & ")").ForeColor = &HFFFF& '黄色
Next J
End Sub
Private Sub Form_Timer()
If I = 30 Then I = 0
I = I + 1
For J = 0 To 29
Me("Label1(" & J & ")").Visible = False
Next J
If I Mod 3 = 2 Then
For J = 0 To 9
Me("Label1(" & J * 3 + 1 & ")").Visible = True
Next J
Else
If I Mod 3 = 0 Then
For J = 0 To 9
Me("Label1(" & J * 3 + 2 & ")").Visible = True
Next J
Else
For J = 0 To 9
Me("Label1(" & J * 3 & ")").Visible = True
Next J
End If
End If
End Sub