Private Sub Command1_Click()
Dim t As Single, y As Single, p As Single
For t = 0 To 3000 Step 0.0002
doevents
y = -t + 3001
Select Case y
Case 1 To 1000
Shape1.FillColor = vbBlue
Case 1000.001 To 2000
Shape1.FillColor = vbRed
Case 2000.001 To 3001
Shape1.FillColor = vbYellow
End Select
Next t
End Sub