Ãö©óOnTimeµo¥Íªº¿ù»~¡A¨D¸Ñ¡I~~·P®¦
- ©«¤l
- 10
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 18
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-4-3
- ³Ì«áµn¿ý
- 2015-9-11
|
Ãö©óOnTimeµo¥Íªº¿ù»~¡A¨D¸Ñ¡I~~·P®¦
¤p§Ì¥Î¤FworkbookªºOpen¨Æ¥ó¨Ó±Ò°Ê¤@ӥΤFOnTime¥\¯à¡A¨Ó§Û¿ý½L¤¤ªÑ»ùªº§Y®ÉÅܤơA¦ý¶]¨ì¹w³]µ²§ô®É¶¡¡A¥X¤F¤@Ó¿ù»~°T®§¡A½Ð¦U¦ì«e½úÀ°¦£§i¶D§Ú°ÝÃD¥X¦bþ¸Ì¡H
½s½X¦p¤U
Private Sub Workbook_Open()
Application.OnTime TimeValue("21:34:00"), "»ù®t¬ö¿ý"
End Sub
--------------------------------------------------------------------------
Sub »ù®t¬ö¿ý()
Dim Line As Double
Dim Close_T As String
Line = Sheet1.Range("F1").End(xlDown).Row
Close_T = Format(Time, "h:m")
If Close_T <> "21:35" Then
Sheet1.Cells(Line + 1, 6) = Cells(2, 6)
Sheet1.Cells(Line + 1, 7) = Cells(2, 7)
Application.OnTime Now + TimeValue("00:00:05"), "»ù®t¬ö¿ý"
Else
Application.OnTime Now + TimeValue("00:00:05"), "»ù®t¬ö¿ý", , False
End If
End Sub
¿ù»~°T®§¦p¤U¡G
|
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 1# oklin
§AªºElse¨º¬q§¹¥þ¨S¥Î~
Application.OnTime ¬O±Æµ{
¥ÎFalse°Ñ¼Æ¬O¨ú®ø¬Y®É¶¡ªº±Æµ{
¬JµM§A®É¶¡¨ì´N¤£¦A±Æµ{¤F¡A¨º»ò¸Ó®É¶¡´N¨SªF¦è¥i¥H¨ú®ø
¦Ó¥Bn¨ú®øªº¸Ü¡A®É¶¡n¤@P¡A§A³o¼Ë¬O¤£·|¤@Pªº |
|
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C
|
|
|
|
|
- ©«¤l
- 10
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 18
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-4-3
- ³Ì«áµn¿ý
- 2015-9-11
|
¦^´_ 2# stillfish00
·PÁ±zªº¦^ÂСA¦ý§Ú¤£¬O«Ü¤F¸Ñ±zªº·N«ä¡A¦r±¤W§Úªº±Æµ{°£¤F¤@¶}©lªºWorkbook openIJµoªº¬O¤@Ó©T©w®É¶¡¡A¤§«á´N¬O¨C¹j5¬í±Ò°Ê¤@¦¸¡A¤]´N¬O¤U±³o¤@¦æ
Application.OnTime Now + TimeValue("00:00:05"), "»ù®t¬ö¿ý"
Esle¤§«á¨ú®øªº¤]¬O
Application.OnTime Now + TimeValue("00:00:05"), "»ù®t¬ö¿ý"¡A¡AFalse
¥t½Ð±Ð¤@¤U¡A§Ú¸Õn¤W¶ÇÀɮסA¼u¨t²Î§i¶D§Ú¤£¤ä´©¦¹ÃþÂX®i©úªºÀɮסA½Ð°Ý§Ú¸Ó¦p¦ó³B²z¡C |
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 1# oklin
°²³]²{¦b®É¶¡ 21:34:55
°õ¦æ¤@¦¸'»ù®t¬ö¿ý':
Close_T <> "21:35" ©Ò¥H°õ¦æ Then °Ï¶ôµ{¦¡½X
Application.OnTime Now + TimeValue("00:00:05"), "»ù®t¬ö¿ý"
¹w¬ù¤F¤U¦¸°õ¦æ®É¶¡ ¤j¬ù¦b 21:35:00 , µ²§ô
®É¶¡ 21:35:00
°õ¦æ'»ù®t¬ö¿ý':
Close_T = "21:35" ©Ò¥H°õ¦æ Else °Ï¶ôµ{¦¡½X
Application.OnTime Now + TimeValue("00:00:05"), "»ù®t¬ö¿ý", , False
¨ú®ø«o¬O¨ú®ø¤w¹w¬ù¦b 21:35:05 ªº'»ù®t¬ö¿ý'
*·|»¡¤j¬ù¬O¦]¬°¡A¦pªG§A«e±°õ¦æªºµ{¦¡½X¤@¦h¡A
·í§A°õ¦æ¨ìNow®É¨ú±oªº®É¶¡¥i¯à¤w¤£¬O21:34:55
¤W¶Çªþ¥ó¦³¨î°ÆÀɦW¡A§A¥i¥HÀ£ÁY¦A¶Ç¡A¤U¹Ï¦³¼g
|
|
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C
|
|
|
|
|
- ©«¤l
- 10
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 18
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-4-3
- ³Ì«áµn¿ý
- 2015-9-11
|
¦^´_ 2# stillfish00
©Ò¥H±zªº·N«ä¬O¡A¦]¬°§Úªº»Ý¨D¬O¨ì¤F¬Y¤@®É¶¡´N°±¤î¨C5¬í§ì¤@¦¸¸ê®Æ¡A©Ò¥H¡A§Ú¥u¶·§PÂ_®É¶¡¨ì¤F¨S¡A¦pªGÁÙ¨S¦³¨ì¡A´N¹w¬ù¤U¤@Ó5¬í¡A¤@¥¹®É¶¡¨ì¤F´N¤£¥Î¹w¬ù¡AOnTime´N°±¤F¡C¹ï¶Ü¡H
©Ò¥H§Ú¥u¶·§â
Else
Application.OnTime Now + TimeValue("00:00:05"), "»ù®t¬ö¿ý", , False
¬å±¼´N¥i¹F¦¨§Úªº´Á±æ¤F¡I |
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
|
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C
|
|
|
|
|