ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¨ú±o ²{¦bªº ®É¤À¬í ¼Æ¦r

¨ú±o ²{¦bªº ®É¤À¬í ¼Æ¦r

Sub test0459()
   t1 = Timer
   ' ¨ú±o ²{¦bªº®É¶¡¡A±q¤µ¤Ñªº 00:00:00 ¨ì
   ' ²{¦bªº¬í¼Æ¡A¬O double
   
   t2 = Int(t1 / 60#)
   ' ¨ú±o¤ÀÄÁ
   
   t1 = t1 - t2 * 60#
   t1 = Int(t1)
   
   t3 = Int(t2 / 60#)
   ' ¨ú±o ¤p®É
   
   t2 = t2 - t3 * 60
   MsgBox (t3 & ": " & t2 & ": " & t1)
End Sub
¤Ñ¤U¬°¤½

¥ç¥i§Q¥Î¤º«Ø¨ç¼Æ
Sub test()
MsgBox Hour(Now) & " " & Minute(Now) & " " & Second(Now)
End Sub

TOP

¦^´_ 1# sjgau
³o¼Ë¤£¬O§óª½±µ¶Ü¡H
  1. Sub Ex()
  2.     MsgBox Format(Now(), "hh:mm:ss")
  3. End Sub
½Æ»s¥N½X

TOP

timer ©M now ¦³¦ó°Ï§O
ss

TOP

¦^´_ 4# sunnyso
Timer ¨ç¼Æ¶Ç¦^¤@ Single ­È¡A¨ä¤º®e¬°±q«e¤@­Ó¤È©]ºâ°_¨ì²{¦b©Ò¸g¹Lªº¬í¼Æ¡C
Now ¨ç¼Æ¶Ç¦^¤@ Variant (Date)¡A¤º®e¬°¹q¸£²{¦b©Ò°O¿ýªº¤é´Á»P®É¨è (¥Ø«eªº¨t²Î¤é´Á»P®É¶¡)¡C

TOP

¦^´_ 5# c_c_lai

·PÁ¸ԲӸѻ¡, ¨ü±Ð¤F
ss

TOP

¦^´_ 6# sunnyso


    Sub test()
   MsgBox ("hello, world! " & Timer)
   Cells(5, 1) = Timer
   ' 34886.01172 --> ±q¤µ¤Ñ¦­¤Wªº ­â±á 00:00:00 ¨ì²{¦bªº¬í¼Æ



End Sub
¤Ñ¤U¬°¤½

TOP

Sub test()
   MsgBox ("timer= " & Timer)
   Cells(5, 1) = Timer
   ' 34886.01172
   
   MsgBox ("now= " & Now)
   Cells(6, 1) = Now
   ' 2013/10/24 09:50
End Sub
¤Ñ¤U¬°¤½

TOP

  1. Sub test1016()
  2.    Randomize
  3.    Dim a As Single, b As Single, c As Single
  4.    
  5.    a = Rnd * 90 + 10
  6.    b = Rnd * 90 + 10
  7.    
  8.    ' show a, b
  9.    MsgBox (" a= " & a & ", b= " & b)
  10.    
  11.    Randomize
  12.    ' Dim a As Single, b As Single, c As Single
  13.    ' a, b, c ÅܼơA¤£¥i¥H ­«½Æ«Å§i
  14.    
  15.    Dim x As Single, y As Single, z As Single
  16.    ' DIM ¥i¥H©ñ¦bµ{¦¡¬q¸¨ªº ¤¤¶¡
  17.    
  18.    x = Rnd * 90 + 10
  19.    y = Rnd * 90 + 10
  20.    
  21.    MsgBox (" a= " & x & ", b= " & y)
  22. End Sub
½Æ»s¥N½X
¦^´_ 8# sjgau
¤Ñ¤U¬°¤½

TOP

        ÀR«ä¦Û¦b : §g¤l¥ß«í§Ó¡A¤p¤H«í¥ß§Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD