- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-10-25 09:57 ½s¿è
¦^´_ 1# shing0520
1. º¥ý©p¶}±Ò "ªÑ²¼³ø»ù¼Æ¾Ú¦Û°Ê°O¿ý.xlsx" Àɮ׫á¡A±N¥¦¥t¦s·sÀÉ
¦sÀÉÃþ«¬½Ð¿ï¾Ü "Excel ±Ò¥Î¥¨¶°ªº¬¡¶Ã¯ (*.xlsm)" ¡B©ÎªÌ
"Excel 97-2003 ¬¡¶Ã¯ (*.xls) " ªºÀɮ׫¬ºA¡C
2. ½Ð±N¤U¦Cµ{¦¡½X¥þ³¡°Å¶K¦Ü ThisWorkbook µ{¦¡½X°Ï¶ô¤ºÀx¦s¡G- Option Explicit
- Private Sub Workbook_Open()
- If Weekday(Date, 2) <= 5 Then Scheduler ' «D°²¤é«h°õ¦æ Scheduler
- End Sub
- Sub RTimer()
- Dim TimeRange As Range, Rng As Range
- Dim tm As Date
- If TimeValue(Now) >= TimeValue("13:45:01") Then Exit Sub ' ¤@¹L½L«á§Y¦Û¦æ¸õÂ÷¡A¤£¦A°õ¦æ
-
- tm = Now()
- With Sheets("³sµ²®É¶¡°O¿ý")
- Set TimeRange = .[A:A].Find(TimeSerial(Hour(tm), Minute(tm), 0)) ' Àˬd "A" Äæ¦ì¹ïÀ³¤§®É¶¡¸ê®Æ
- If Not TimeRange Is Nothing Then ' §k¦X¹w¥ý±Æµ{®É¬q¡A«h°õ¦æ¹ïºÙ¼g¤J¸ê®Æ
- Set Rng = TimeRange.Offset(, 1).Resize(1, 2)
-
- Rng(1) = .[I2] ' º¦´T%
- Rng(2) = .[G2] ' ¦¨¥æ
- End If
- End With
- Scheduler
- End Sub
- Sub Scheduler()
- If TimeValue(Now) < TimeValue("08:45:00") Then
- Application.OnTime (TimeValue("08:45:00")), "ThisWorkbook.RTimer" ' 8:45 ®É¶¡¤@¨ì·|¦Û°Ê°õ¦æ
- Else
- Application.OnTime (Now + TimeValue("00:00:01")), "ThisWorkbook.RTimer" ' ¨C¹j¤@¤ÀÄÁ·j´M¤@¦¸
- End If
- End Sub
½Æ»s¥N½X 3. ±NÀÉ®×¥ý¦æÀx¦sÃö³¬«á¡A¦A«·s¶}±Ò´N¥i¦Û°Ê³B²z¹B§@¤F¡C
4. ¦bµ{¦¡¤¤§Ú¥[µù¤F¤@¨Ç»¡©ú¡A§Æ±æ¹ï©p·|¦³©ÒÀ°§U¡C¯¬´r§Ö¡I |
|