´Æ¤âªºexcel¹Bºâ°ÝÃD¡A¦p¦ó§ïµ½??
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
¦^´_ 40# c_c_lai
¥i¥H°O¿ý¡A¦ý¤£¥i²Îp¡AC¤jÁÂÁ¡A§Ú·Q§ÚÁÙ¬O§ï¥ÎAPI+EXCELªº¤è¦¡¶i¦æ¦n¤F¡A¤£¥Î¦A¶O¤ß¤F¡A¯uªº«D±`ªºÁÂÁ©p |
|
|
|
|
|
|
- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-2-3 10:34 ½s¿è
¦^´_ 38# ÂŤÑÄR¦À
ªþÀɸոլݬݥt¤@§@ªk
EX.rar (28.72 KB)
ThisWorkbook¼Ò²Õ- Option Explicit
- Private Sub Workbook_BeforeClose(Cancel As Boolean) '
- 'ÀÉ®×Ãö³¬:Ãö³¬Àɮ׳sµ²
- '**Àɮצb¶}±Ò®É,¤£±Ò°Ê¸ß°Ý§ó·s¸ê®Æªºµøµ¡
-
- ActiveWorkbook.UpdateLinks = xlUpdateLinksNever
- 'UpdateLinks ÄÝ©Ê ¶Ç¦^©Î³]©w XlUpdateLink ±`¼Æ¡A¦¹±`¼Æ¥i«ü¥X¬¡¶Ã¯§ó·s¤º´O OLE ³s½uªº³]©w¡CŪ/¼g¡C
-
- 'XlUpdateLinks ¥i¥H¬O³o¨Ç XlUpdateLinks ±`¼Æ¤§¤@¡C
- 'xlUpdateLinksAlways ¥Ã»·§ó·s«ü©w¬¡¶Ã¯ªº¤º´O OLE ³s½u¡C
- 'xlUpdateLinksNever ¥Ã»·¤£§ó·s«ü©w¬¡¶Ã¯ªº¤º´O OLE ³s½u¡C
- 'xlUpdateLinksUserSetting ®Ú¾Ú¨Ï¥ÎªÌ¹ï«ü©w¬¡¶Ã¯ªº³]©w¨Ó§ó·s¤º´Oªº OLE ³s½u¡C
- End Sub
- Private Sub Workbook_Open()
- Application.Calculation = xlAutomatic ' ¬¡¶Ã¯³]¬°¦Û°Ê«ºâ
- 'Àɮצb¶}±Ò®É:¦Û°Ê§ó·s³sµ²
- With ActiveWorkbook
- .UpdateRemoteReferences = True
- .SaveLinkValues = True
- End With
- End Sub
½Æ»s¥N½X Sheet1(Sheets("RTD")) ¼Ò²Õªºµ{¦¡½X- Option Explicit
- Dim D As Object, xTime As Date, Volume As Double
- Private Sub Worksheet_Calculate()
- If IsError([E2]) Or Time < #8:45:00 AM# Then Application.StatusBar = "µ¥Ô¶}½L¤¤": Exit Sub
-
- '[E2] = "--" ¶}½L«eªº²Å¸¹
- If Volume <> [E2] And [E2] <> "--" And Time >= #8:45:00 AM# And Time < #1:46:00 PM# Then
- If D Is Nothing Then
- Application.OnTime #1:46:00 PM#, "SHEET1.¬ö¿ý" '¦¬½L«á±j¨î¼g¥X³Ì«á¤@¤ÀÄÁªº¸ê®Æ
- Application.StatusBar = False
- Set D = CreateObject("scripting.dictionary")
- Range("A" & Rows.Count).End(xlUp).CurrentRegion.Offset(1) = ""
- Sheets("¬ö¿ý").UsedRange.Clear
- xTime = TimeSerial(Hour(Time), Minute(Time), 0)
- End If
- If TimeSerial(Hour([B2]), Minute([B2]), 0) <> xTime And D.Count > 0 Then ¬ö¿ý '¤U¤@¤ÀÄÁ¶}©l®É,¬ö¿ý¤W¤@¤ÀÄÁªº¬ö¿ý
- D([C2].Value) = D([C2].Value) + IIf([D2] <= 10, -1, 1) '¦r¨åª«¥ó:¬ö¿ý¦¨¥æ³æ¶q¤½¦¡ªºÈ
- Volume = [E2]
- xTime = TimeSerial(Hour([B2]), Minute([B2]), 0)
- '**************** °O¿ý¨C¦¸¦¨¥æ¬ö¿ý***************
- With Range("A" & Rows.Count).End(xlUp).Offset(1)
- .Cells(1) = [B2] '®É¶¡
- .Cells(1, 2) = [C2] '¦¨¥æ»ù
- .Cells(1, 3) = [D2] '¦¨¥æ³æ¼Æ
- .Cells(1, 4) = IIf([D2] <= 10, -1, 1) '¦¨¥æ³æ¶q¤½¦¡ªºÈ
- End With
- '************************************************
- End If
- End Sub
- Private Sub ¬ö¿ý()
- Dim R As Integer, C As Integer, X As Integer
- Application.EnableEvents = False
- With Sheets("¬ö¿ý")
- If .[A1] = "" Then .[A1] = "®É¶¡"
- With .Range("A" & .Rows.Count).End(xlUp).Offset(1)
- R = .Row
- .NumberFormat = "HH:MM"
- .Value = xTime
- .Resize(2).Merge
- End With
- C = 2
- '°j°é:¦r¨åª«¥óªºKEY(ÃöÁä¦r) ³Ì¤jÈ - ³Ì¤pÈ.
- For X = Application.Max(D.KEYS) To Application.Min(D.KEYS) Step -1
- If D.EXISTS(X) Then '¦r¨åª«¥ó¦³³oÓKEY(ÃöÁä¦r)
- If .Cells(1, C) = "" Then .Cells(1, C) = C - 1
- .Cells(R, C) = X
- .Cells(R, C).Interior.ColorIndex = 40
-
- .Cells(R + 1, C) = D(X)
- C = C + 1
- End If
- Next
- End With
- D.RemoveAll '«³],¦r¨åª«¥ó(¬ö¿ý¦¨¥æ»ùªº¤½¦¡ªºÈ)
-
- '³o¦æªºµ{¦¡½X¥i§R°£¤W¤@¤ÀÄÁªº¸ê®Æ,¥[³tµ{¦¡ªº¹B¦æ
- Range("A" & Rows.Count).End(xlUp).CurrentRegion.Offset(1) = "" '¦pn«O¯d¥iµù¸Ñ±¼¤£¥²°õ¦æ
- Application.EnableEvents = True
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
¦^´_ 42# GBKEE
G¤j¤µ¤Ñ¥xªÑ«ÊÃö¤F¡An¸Õ¤]nµ¥¹L¦~«á¤F¡AÁÂÁ©p |
|
|
|
|
|
|
- ©«¤l
- 320
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 310
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- 2k
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-6-24
- ³Ì«áµn¿ý
- 2024-12-21
|
¦^´_ 43# ÂŤÑÄR¦À
«ÊÃö¤@¼Ë¥i¸Õ |
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
|
|
|
|
|
|