試試看
dim cc as date, m%, s%
cc = cdate((timer-t0)/86400)
m = Minute(cc)
s = second(cc)
msgbox "執行時間: " & m & " 分 " & s & " 秒"作者: Scott090 時間: 2018-3-10 08:53
S大~補充一下,我是用以下3段程式碼測試的dim cc as date, m%, s%
dim t0
t0=timer
cc = cdate((timer-t0)/86400)
m = Minute(cc)
s = second(cc)
msgbox "執行時間: " & m & " 分 " & s & " 秒"
dim t0
dim m%,s%
t0=timer
s=int(timer-t0)
m=s\60
s=s-m*60
xxxxxxxxxxxxx(程式碼)
msgbox "執行時間: " & m & " 分 " & s & " 秒"
dim s%
dim t0
t0=timer
s=int(timer-t0)
msgbox "執行時間: " & s\60 & " 分 " & s mod 60 & " 秒"作者: jackyq 時間: 2018-3-12 14:00
t0 = Timer
'========== your code begin
................
'========== your code end