主题:[求助]大家帮我检查下vb60的倒计时程序
[求助]大家帮我检查下vb60的倒计时程序
大家帮我检查下vb60的倒计时程序?特别是"Label6.Caption = Str(Int(dd / (3600 * 24)))",为何出现语法错误?谢谢俄i
Private Sub Form_click()
Dim starttime As String
Dim endtime As String
starttime = Now
endtime = CDate("2009-07-10 22:00:00")
Dim dd As Long
dd = DateDiff("s", starttime, endtime)
Label6.Caption = Str(Int(dd / (3600 * 24)))
Label7.Caption = Str(Int((dd - (Int(dd / (3600 * 24))) * (3600 * 24)) / 3600))
Label8.Caption = Str(Int((dd - (Int(dd / (3600 * 24))) * (3600 * 24) - ((dd - (Int(dd / (3600 * 24))) * (3600 * 24)) / 3600) * 3600) / 60))
Label9.Caption = Str(Int(dd - (Int(dd / (3600 * 24))) * (3600 * 24)) - (Int((dd - (Int(dd / (3600 * 24))) * (3600 * 24)) / 3600)) * 3600 - (Int((dd - (Int(dd / (3600 * 24))) * (3600 * 24) - ((dd - (Int(dd / (3600 * 24))) * (3600 * 24)) / 3600) * 3600) / 60)) * 60)
End Sub
大家帮我检查下vb60的倒计时程序?特别是"Label6.Caption = Str(Int(dd / (3600 * 24)))",为何出现语法错误?谢谢俄i
Private Sub Form_click()
Dim starttime As String
Dim endtime As String
starttime = Now
endtime = CDate("2009-07-10 22:00:00")
Dim dd As Long
dd = DateDiff("s", starttime, endtime)
Label6.Caption = Str(Int(dd / (3600 * 24)))
Label7.Caption = Str(Int((dd - (Int(dd / (3600 * 24))) * (3600 * 24)) / 3600))
Label8.Caption = Str(Int((dd - (Int(dd / (3600 * 24))) * (3600 * 24) - ((dd - (Int(dd / (3600 * 24))) * (3600 * 24)) / 3600) * 3600) / 60))
Label9.Caption = Str(Int(dd - (Int(dd / (3600 * 24))) * (3600 * 24)) - (Int((dd - (Int(dd / (3600 * 24))) * (3600 * 24)) / 3600)) * 3600 - (Int((dd - (Int(dd / (3600 * 24))) * (3600 * 24) - ((dd - (Int(dd / (3600 * 24))) * (3600 * 24)) / 3600) * 3600) / 60)) * 60)
End Sub