主题:帮我找找原因
......
Dim h, m, s, a, b, c, q, w, e As Long
h = Hour(Time)
m = Minute(Time)
s = Second(Time)
a = shi.Text
b = fen.Text
c = miao.Text
If a < h Then
Text3 = (23 + a - h) * 3600 + (59 + b - m) * 60 + 59 + c - s
End If
If a > h Then
Text3 = (a - h) * 3600 + (b - m) * 60 + c - s
End If
If a = 0 And b = 0 And c = 0 Then
Text3 = (23 - h) * 3600 + (59 - m) * 60 + 59 - s
End If
......
为什么a<h时不执行,其他条件都正常。
Dim h, m, s, a, b, c, q, w, e As Long
h = Hour(Time)
m = Minute(Time)
s = Second(Time)
a = shi.Text
b = fen.Text
c = miao.Text
If a < h Then
Text3 = (23 + a - h) * 3600 + (59 + b - m) * 60 + 59 + c - s
End If
If a > h Then
Text3 = (a - h) * 3600 + (b - m) * 60 + c - s
End If
If a = 0 And b = 0 And c = 0 Then
Text3 = (23 - h) * 3600 + (59 - m) * 60 + 59 - s
End If
......
为什么a<h时不执行,其他条件都正常。