- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 21# t8899
קï¤@¤U- Option Explicit
- Public The_Time As Date
- Public my As Date
- Sub timestock()
- If CDec(The_Time) > CDec(Time) Then '¹w¨¾ ¤W¤@¦¸ OnTime©|¥¼°õ¦æ,¦A«×°õ¦æ¤@¦¸OnTime
- '************************
- '·í my <= #12:00:05 AM# ®É
- 'If The_Time > Time Then ³o±ø¥ó¦¡±`·|¦¨¥ß
- '¬O¥Ñ©ó The_Time As Date«¬ºA½d³ò¤p
-
- 'CDec(The_Time) ¶Ç¦^ Decimal ¸ê®Æ«¬ºA
- 'Decimal ¸ê®Æ«¬ºA
- 'Decimal ÅܼƫY¥H 96 ¦ì¤¸ ( 12 Ӧ줸²Õ ) ¦³¥¿t¸¹ªº¾ã¼Æ§Î¦¡¨ÓÀx¦s¡C10 ªº«ü¼Æ¥H¤p¼ÆÂI¥kÃ䪺¦ì¤¸¼Æ¨Ó½Õ¾ã¡A½d³ò±q 0 ¨ì 28¡C¦b¨S¦³¤p¼Æ¦ì¼Æªº±¡§Î¤U¡A³Ì¤jªº¥i¯àȬ° +/-79,228,162,514,264,337,593,543,950,335¡C¦Ó¦b¦³ 28 Ó¤p¼Æ¦ì¸mªº±¡§Î¤U¡A³Ì¤jȬ° +/-7.9228162514264337593543950335¡A¦Ó³Ì¤pªº«D¹sȬ° +/-0.0000000000000000000000000001¡C
- 'ªþµù ¦¹®É¡ADecimal ¸ê®Æ«¬ºA¥u¯à¦b Variant¤¤¨Ï¥Î
- '¤]´N¬O¡A±z¨Ã¤£¯à«Å§i¤@ÅܼƬ° Decimal ªº«¬ºA¡C¤£¹L±z¥i¥Î Cdec ¨ç¼Æ¡A«Ø¥ß¤@Ó°Æ«¬ºA¬° Decimal ªº Variant¡C
- '************************
- Debug.Print CDec(The_Time), CDec(Time)
- Exit Sub
- End If
- With Sheets("sheet1").Range("a1")
- If .Value = 1 Then
- my = #12:01:00 AM#
- ElseIf .Value = 2 Then
- my = #12:02:00 AM#
- ElseIf .Value = 3 Then
- my = #12:00:30 AM#
- ElseIf .Value = 4 Then
- my = #12:00:20 AM#
- ElseIf .Value = 5 Then
- my = #12:00:05 AM#
- ElseIf .Value = 6 Then
- my = #12:00:10 AM#
- Else
- Exit Sub
- End If
- End With
- The_Time = Time + my
- Debug.Print The_Time
- Application.OnTime The_Time, "timestock"
- End Sub
½Æ»s¥N½X |
|