¦p¦ó±N¥x«ü´Áªº¨C¤@¤ÀÄÁ¸ê®Æ³£¬ö¿ý¦bsheet 1¸Ì..½Ð±Ðª©¤W°ª¤â«e½ú~~
- ©«¤l
- 93
- ¥DÃD
- 18
- ºëµØ
- 0
- ¿n¤À
- 111
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- OFFICE
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW¡E°ª¶¯
- µù¥U®É¶¡
- 2010-10-22
- ³Ì«áµn¿ý
- 2023-3-3
|
¦p¦ó±N¥x«ü´Áªº¨C¤@¤ÀÄÁ¸ê®Æ³£¬ö¿ý¦bsheet 1¸Ì..½Ð±Ðª©¤W°ª¤â«e½ú~~
¦U¦ì°ª¤â«e½ú¡G¤¤¬î¨Î¸`§Ö¼Ö
§Ú´¿®M¥Î¡Aª©¤W¤j¤À¨Éªºµ{¦¡½X¡A³s¤W[¬Ý½L³nÅéDDE]«o¤£·|°Ê¡C·Q½Ð°Ýª©¤j¡A§Ú¸Ó«ç»ò§ï¤~¥i¥H¨Ï¥Î¡C
²{¦b§Ú·Q«·s«Ø¥ß·sªºÀÉ¡A½Ð¥ýÅý§Ú²³æ»¡©ú§Úªº»Ý¨D¡G
1.sheet 4 ¬O¬Ý½L³nÅéDDE¿é¥X¨ìExcelªº¸ê®Æ¡C
2.§Ú§Æ±æ¯à±N¥x«ü´Áªº¨C¤@¤ÀÄÁ¸ê®Æ³£¬ö¿ý¦bsheet 1¸Ì¡A¤£¬Oª½±µ¬ö¿ýDDE¦^¶Çªº¸ê®Æ¡A
¦Ó¬O¬ö¿ýsheet 4¨C¤@¤ÀÄÁªº[¦¨¥æ»ù][³Ì°ª][³Ì§C][¦¨¥æ¶q]
¥H¤W¥ÎExcel¤£ª¾¬O§_¥i¦æ¡H½Ð±Ðª©¤W°ª¤â«e½ú~~
ªþ¤W¡G§Úªº[¬Ý½L³nÅéDDE]Âà¥X¨ìExcel¨Sµ{¦¡½Xªº(¦p¹Ï) |
-
-
TX00a.zip
(4.99 KB)
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤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
|
|
|
|
|
|
|
- ©«¤l
- 93
- ¥DÃD
- 18
- ºëµØ
- 0
- ¿n¤À
- 111
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- OFFICE
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW¡E°ª¶¯
- µù¥U®É¶¡
- 2010-10-22
- ³Ì«áµn¿ý
- 2023-3-3
|
¦^´_ 2# c_c_lai
³Ì¨Îªº¤¤¬î¸`§ª«...¾Öº¡Ãhªº¡y·PÁ¡zµ¹§A[c_c_lai]~~
èè´ú¸Õ«Üº¡·N¡A±µµÛµ¥¬P´Á¤@¦A¹ê´ú¤F~~ÁÂÁÂ~~ |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤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
|
¬°¤FÅý§ó¦h¤H¶i¤@¨B©úÁA¾ãÅ骺§@·~¹Lµ{¡A¥¼¨Ó¤]¥i¥H¦Û¤v¦b¹ê°È¤W¹ê»Úºt½m
¤Î¼¯ÀÀ¡A¬G±N§@·~µe±»Pµ{¦¡¤@¨Ö¶Kªþ¤W¨Ó¤À¨É¡C
§Æ±æ¨CÓ¤H³£¯à±q¤¤¾Ç²ß»â®©¡B¼g¥X§ó¨Îªºµ{¦¡¡A¦A±N¦¨ªG¤À¨É´£¨Ñµ¹¤j®a¡I- Option Explicit
- Dim Ov As Single, Hv As Single, Lv As Single, Cv As Single
- Dim timerEnabled As Boolean ' §P©w¶}±Ò¥»¤u§@ªí³æªº®É¬q¬O§_¬°¶}½L«e±Ò°Ê¡C
- Public turnKey As Integer
- Private Sub Workbook_Open()
- timerEnabled = False
- Sheets("Sheet4").[I2] = Sheets("Sheet4").[H2] ' ³]©w«e¦¨¥æ¶q
- Call timerStart ' µ{¦¡¤@±Ò©l¡A«K¥h¦Û°Ê°õ¦æ timerStart
- End Sub
- Private Sub Workbook_BeforeClose(Cancel As Boolean)
- On Error Resume Next
- Application.OnTime Now + TimeValue("00:00:01"), "ThisWorkbook.RTimer", , False
-
- Me.Save
- End Sub
- Public Sub RTimer(tm As Date)
- Dim TimeRange As Range, Rng As Range
- Dim pos As Integer
-
- On Error Resume Next
- If (TimeValue(Now) > TimeValue("13:45:00")) Then Exit Sub
-
- If (TimeValue(Now) >= TimeValue("08:45:00")) Then ' ¶}½L¡B¦¬½L®É¬q³]©w
- ' ½L¤¤³B²z¡A±N¸ê®Æ¶×¤J¼g¤J¤u§@ªí³æ¤ºÀx¦s¡C
- With Sheets("Sheet1")
- If Not IsError(.[B2]) Then
- .[B1] = "¦¨¥æ»ù"
- .[C1] = "³Ì°ª»ù"
- .[D1] = "³Ì§C»ù"
- .[E1] = "¦¨¥æ¶q"
-
- Set TimeRange = .[A:A].Find(TimeSerial(Hour(tm), Minute(tm), 0)) ' Àˬd "A" Äæ¦ì¹ïÀ³¤§®É¶¡¸ê®Æ
- Set Rng = TimeRange.Offset(, 1).Resize(1, 4)
-
- Rng(1) = Cv ' ¦¨¥æ»ù
- Rng(2) = Hv ' ³Ì°ª»ù
- Rng(3) = Lv ' ³Ì§C»ù
- Rng(4) = Sheets("Sheet4").[H2] - Sheets("Sheet4").[I2] ' ¦¨¥æ¶q
- Sheets("Sheet4").[I2] = Sheets("Sheet4").[H2] ' «·s³]©w«e¦¨¥æ¶q
- End If
- End With
- End If
- End Sub
- Sub timerStart()
- turnKey = 0 ' p¼Æ¾¹«·sÂk¹s
- Sheets("Sheet4").[A3] = "( " & turnKey & " ’ )"
-
- If timerEnabled Then
- ' ²Ä¤G¦¸(§t)¥H«á§¡¥H³]©w¤§ "¶¡¹j®É¬q" ¨Ó³B²z°õ¦æ§Çªº§@·~¡C
- Application.OnTime (Now + TimeValue("00:00:01")), "ThisWorkbook.inProcess"
- Else
- timerEnabled = True
-
- ' ±N²Ä¤@¦¸±Ò°Ê®É¶¡§ó§ï¬°³]©w "¶}½L®É¶¡"«e¡A¦pªG¶}±Ò Excel ®É¡A¤w¸g¹L¤F³]©w "¶}½L®É¶¡"¡A«h¤@¶i¤J¨t²Î§Yª½±µ¥h°õ¦æ¬ö¿ý§@·~¡C
- If (TimeValue(Now) <= TimeValue("08:45:00")) Then
- Sheets("Sheet1").[B2:E301].ClearContents ' ²M°£«e¤@¤é¤§¸ê®Æ
- Application.OnTime (TimeValue("08:45:00")), "ThisWorkbook.inProcess"
- Else
- ' ¨t²Îè³s¤W DDE ¦Ü¸ê®Æ¶×¤JExcel¤u§@ªí³æ¡A¶·¦³¤@Ó½w½Ä®É¬q¡A
- ' ³o®É¦pªG°¨¤W¥h§ì¨úDDE¸ê®Æ¡A·|¦³«¬ºA¤£²Åªº¿ù»~°T®§²£¥Í¡A¨Ã¤¤Â_°õ¦æ§Çªº§@·~¡C
- Application.OnTime (Now + TimeValue("00:00:05")), "ThisWorkbook.inProcess"
- End If
- End If
- End Sub
- Private Sub inProcess()
- Static Msg As Boolean ' ¥Î¥H§P©w¬O§_¬°¨C¤é²Ä¤@¦¸°õ¦æ
- Static timeCalc As Date ' °O¿ý¨C¤ÀÄÁªº®É¶¡
-
- On Error Resume Next
- If (TimeValue(Now) < TimeValue("08:45:00") Or TimeValue(Now) > TimeValue("13:46:01")) Then Exit Sub
-
- If Msg = False Then
- timeCalc = TimeSerial(Hour(Time), Minute(Time), 0) ' ³]©w¥Ø«e°_©lªº®É¶¡
- Msg = True
- End If
-
- If IsError(Sheets("Sheet4").Range("B2").Value) Then
- Cv = 0
- Else
- Cv = Sheets("Sheet4").Range("B2").Value ' ¦¨¥æ»ù
- End If
-
- If (turnKey = 0 Or Ov = 0) Then
- Ov = Cv ' ¶}½L»ù
- Hv = Cv ' ³Ì°ª»ù
- Lv = Cv ' ³Ì§C»ù
- End If
-
- If (Cv > Hv) Then Hv = Cv ' ³Ì°ª»ù
- If (Cv < Lv) Then Lv = Cv ' ³Ì§C»ù
-
- turnKey = turnKey + 1
- Sheets("Sheet4").[A3] = "( " & turnKey & " ’ )"
- If Time >= timeCalc + #12:01:00 AM# Then
- If (Cv > 0) Then Call RTimer(Time)
- timeCalc = TimeSerial(Hour(Time), Minute(Time), 0) ' «·s³]©w¤U¤@¤ÀÄÁ¤ñ¹ïªº®É¶¡
- If timerEnabled Then Call timerStart
- Else
- Application.OnTime (Now + TimeValue("00:00:01")), "ThisWorkbook.inProcess"
- End If
- End Sub
½Æ»s¥N½X
|
|
|
|
|
|
|
- ©«¤l
- 93
- ¥DÃD
- 18
- ºëµØ
- 0
- ¿n¤À
- 111
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- OFFICE
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW¡E°ª¶¯
- µù¥U®É¶¡
- 2010-10-22
- ³Ì«áµn¿ý
- 2023-3-3
|
¦^´_ 4# c_c_lai
c_c_laiª©¤j§A¦n¡F¸g¹L¤T¤Ñªº¹ê´ú¡A¦³®É·|·í¾÷(¸ê®Æ¨S¶i¨Ó)«Ý¦hÆ[´ú´X¤é¦A½Ð±Ð¤F¡A
¾ãÅé¤W«D±`º¡·N~~...ÁÂÁÂ!! |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤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
|
¦^´_ 5# cfuxiong
¦b¶]³o¤äµ{¦¡°õ¦æ¤¤¡A¤Á°O¤Å¶}±Ò¥t¤@°¦Excel µ{¦¡¡A½Ð¦^¾Ð¬Ý¬Ý¬O§_¦³³oºØ±¡§Î¡H
¦pªG¥u¬O³æ¯Â¶]³o°¦ªº¸Ü¡A°£«D¬O¹q¸£¥»¨¦³ª¬ªp¡A§A»¡ªº±¡ªp¬O¤£¥i¯à·|µo¥Íªº¡I |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 5# cfuxiong
ÁÙ¦³¦pªG¨é°Óªº³nÅé±¾¤F«·s¶}±Ò¡A EXCEL ¥çn¤@¨Ö¥ý¤©Ãö³¬«á¦A¶} («·s³sµ²DDE)¡C |
|
|
|
|
|
|
- ©«¤l
- 93
- ¥DÃD
- 18
- ºëµØ
- 0
- ¿n¤À
- 111
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- OFFICE
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW¡E°ª¶¯
- µù¥U®É¶¡
- 2010-10-22
- ³Ì«áµn¿ý
- 2023-3-3
|
¦^´_ 7# c_c_lai
c_c_laiª©¤j§A¦n¡F¬Q¤Ñ¹ê´ú¬O¦³»P[¶qºA]¦P®É¨Ï¥Î....
¤µ¤Ñ´N¨S°ÝÃD¤F...¨ºn»P[¶qºA]¨Ö¥Î¬O§_´NµL¸Ñ¡H
¦]¬Ý½L³nÅédde¦³[©e¶R½æ¶q]¨S¦³[©e¶R½æµ§¼Æ]¤£¯àpºâ[¶qºA]~
ÁÂÁ¦^À³»P«ü¾É~~
¯à§_µ¹»P«ü¾É [email protected] |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤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
c_c_laiª©¤j§A¦n¡F¬Q¤Ñ¹ê´ú¬O¦³»P[¶qºA]¦P®É¨Ï¥Î....
¤µ¤Ñ´N¨S°ÝÃD¤F...¨ºn»P[¶qºA]¨Ö¥Î ...
cfuxiong µoªí©ó 2012-10-4 19:10
¯à¤£¯à±N¥¦Ì¦X¨Ö¦b¤@Ó EXCEL ¤ºÀ³¥Î¡H
³o¤]¬O§Ú¤@ª½ªº§xÂZ¡A¤£ª¾¬O EXCEL ªº VBA ¬Û¤¬¶¡³B²z©Ò¾ÉP¡AÁÙ¬O¨ä¥¦¦]¯À¡H |
|
|
|
|
|
|
- ©«¤l
- 93
- ¥DÃD
- 18
- ºëµØ
- 0
- ¿n¤À
- 111
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- OFFICE
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW¡E°ª¶¯
- µù¥U®É¶¡
- 2010-10-22
- ³Ì«áµn¿ý
- 2023-3-3
|
¦^´_ 9# c_c_lai
c_c_laiª©¤j§A¦n¡F¤µ¤Ñ´«ÜDDE¤Sn«·s«Ø¥ß¡A¨º§ÚÌ©Ò½s¿èªºVBAn¦p¦ó²¾Âà¡C
½Ðµ¹¤©«ü¾É...ÁÂÁÂ!! |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|