- ©«¤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-8-4 07:27 ½s¿è
¦^´_ 44# slip - Sub GetDDE()
- Dim T As Date, Sh(1 To 2), i As Long
-
- T = Now '¨ú±o²{¦b®É¶¡
- Set Sh(1) = ThisWorkbook.Sheets(1)
- Set Sh(2) = ThisWorkbook.Sheets(2)
- If Not IsError(Sh(1).[B2]) Then Sh(2).[A65536].End(xlUp).Offset(1).Resize(, 7) = Sh(1).[A2:G2].Value '¤u§@ªí1ªº¸ê®ÆDDE³sµ²¦¨¥\¼g¤J¤u§@ªí2
- With ThisWorkbook.Sheets(2).[A65536].End(xlUp).Offset(1) 'ª«¥ó
- i = .Row
- .Range("H1") = .Range("D1") - .Range("C1") 'Hø󪺤½¦¡=>Døó-Cøó
- .Range("I1") = .Range("H1") - .Range("H1").Offset(-1) 'I413=H413-H412......¼Æ¦C2
- .Range("J1") = .Range("E1") 'Jø󪺤½¦¡=Eøó
- xMax = Application.Max(.Parent.[i:j]) '³Ì¤jÈ
- xMin = Application.Min(.Parent.[i:j]) '³Ì¤pÈ
- '** .Parent.ChartObjects(1): ª«¥ó (¤u§@ªíªº²Ä1ӹϪí) *****
- With .Parent.ChartObjects(1).Chart
- .SeriesCollection(1).Values = .Parent.Parent.Range("i2:i" & i) '«ü©w¼Æ¦C¸ê®Æªº½d³ò
- .SeriesCollection(1).ChartType = 52 '«ü©w¼Æ¦C¹ÏªíÃþ«¬
- .SeriesCollection(2).Values = .Parent.Parent.Range("J2:J" & i)
- .SeriesCollection(2).ChartType = 65
- If .SeriesCollection(2).AxisGroup <> xlSecondary Then .SeriesCollection(2).AxisGroup = xlSecondary '¼Æ¦C¤£¦b²Ä2Y®y¼Ð¶b(°Æ®y¼Ð): ¼Æ¦C«ü©w¨ì²Ä2Y®y¼Ð¶b(°Æ®y¼Ð)
- '.AxisGroup = 2 -> °Æ®y¼Ð
- .Parent.Top = .Parent.Parent.Range("L" & IIf(i <= 39, 1, i - 38)).Top '«ü©w¹Ïªí³»ºÝªº¦ì¸m
- With .Axes(xlValue) 'Y(¥D)®y¼Ð¶b
- .MinimumScale = Application.Min(.Parent.Parent.Parent.[I:I]) '³Ì¤pÈ
- .MaximumScale = Application.Max(.Parent.Parent.Parent.[I:I]) '³Ì¤jÈ
- .MajorUnitIsAuto = True '¥Dn¨è«×¶¡¶Z=¦Û°Ê³]©w
- .MinorUnitIsAuto = True '¦¸n¨è«×¶¡¶Z=¦Û°Ê³]©w
- .Crosses = xlAutomatic '®y¼Ð¶b»P¨ä¥L®y¼Ð¶b¥æ¤eªºÂI=¦Û°Ê³]©w
- .ScaleType = xlLinear '¼ÆÈ®y¼Ð¶bªº¨è«×Ãþ«¬=xlLinear
- End With
- With .Axes(xlValue, xlSecondary) 'Y(°Æ)®y¼Ð¶b
- .MinimumScale = Application.Min(.Parent.Parent.Parent.[J:J]) '³Ì¤pÈ
- .MaximumScale = Application.Max(.Parent.Parent.Parent.[J:J]) '³Ì¤jÈ
- .MaximumScaleIsAuto = True
- .MajorUnitIsAuto = True
- .MinorUnitIsAuto = True
- .Crosses = xlAutomatic
- .ScaleType = xlLinear
- End With
- End With
- End With
- Application.ScreenUpdating = True
- Application.OnTime T + TimeValue("00:00:05"), "GetDDE" '¶¡¹j5¤ÀÄÁ§ï¦¨TimeValue("00:05:00"),
- End Sub
½Æ»s¥N½X ½Ð¥[¤J i As Long ªº«Å§i¥H¤Î i = .Row¡C
ºô¯¸¹Ï¤ù¥\¯à¥i¯à³Q²§°Ê¤F¡A¬GµLªk¤W¶Ç¹Ï¤ù¬G§ï¥H¶K¥Üµ{¦¡½X¡C |
|