Anyone have any ideas why at the end of every timer interval (100ms) tmrVal always equals 1? this sub is the only place tmrVal is being used!VB Code:
Dim tmrVal As Long Dim BinVal As String Private Sub tmrCount_Timer() BinVal = DecToBin(tmrVal) For l = -7 To 0 If Mid(BinVal, l + 8, 1) = "1" Then If shpLED(l + 8).BackColor = &H80& Then pbxLedDisplay_MouseUp 0, 0, 200 + ((l + 7) * 360), 250 End If ElseIf Mid(BinVal, l + 8, 1) = "0" Then If shpLED(l + 8).BackColor = &HFF& Then pbxLedDisplay_MouseUp 0, 0, 200 + ((l + 7) * 360), 250 End If End If Next If TimerVal = 255 Then TimerVal = TimerVal - 255 Else tmrVal = tmrVal + 1 End If MsgBox tmrVal End Sub




Reply With Quote