關(guān)于時(shí)間在線計(jì)算倒計(jì)時(shí),時(shí)間在線計(jì)算這個(gè)問題很多朋友還不知道,今天小六來為大家解答以上的問題,現(xiàn)在讓我們一起來看看吧!
1、Private Sub Command1_Click() Dim st As Date Dim ed As Date st = CDate(Text1.Text & ":" & Text2.Text) ed = CDate(Text3.Text & ":" & Text4.Text) Dim v As Double Dim m As Long m = DateDiff("n", st, ed) v = m * 2.5 Label5.Caption = "總計(jì)時(shí)間" & m & "分鐘" Label6.Caption = "總金額" & v End Sub Private Sub Form_Load() Label1.Caption = "開始時(shí)間" Label2.Caption = "結(jié)事時(shí)間" Text1 = "" Label3.Caption = ":" Text2 = "" Text3 = "" Label4.Caption = ":" Text4 = "" Label5.Caption = "總計(jì)時(shí)間" Label6.Caption = "總金額" Command1.Caption = "計(jì)算" End Sub。
本文分享完畢,希望對大家有所幫助。
標(biāo)簽:
免責(zé)聲明:本文由用戶上傳,如有侵權(quán)請聯(lián)系刪除!