- ©«¤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
|
¦^´_ 28# slip
¸Õ¸Õ¬Ý- Sub GetDDE()
- Dim T As Date, xMax As Integer, xMin As Integer, i As Integer
- T = Now '¨ú±o²{¦b®É¶¡
- If Not IsError(Sheets(1).[B2]) Then
- Application.ScreenUpdating = False
- With Sheets(2).[A65536].End(xlUp).Offset(1) 'ª«¥ó
- i = .Row 'Row(ª«¥óÄÝ©Ê):¦C¸¹
- .Resize(, 7) = Sheets(1).[A2:G2].Value '¤u§@ªí1ªº¸ê®ÆDDE³sµ²¦¨¥\¼g¤J¤u§@ªí2
- .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("J2:J" & i) '«ü©w¼Æ¦C¸ê®Æªº½d³ò
- .SeriesCollection(1).ChartType = 52 '«ü©w¼Æ¦C¹ÏªíÃþ«¬
- .SeriesCollection(2).Values = .Parent.Parent.Range("i2:i" & 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®y¼Ð¶b
- .MinimumScale = xMin
- .MaximumScale = xMax
- .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) '²Ä2Y®y¼Ð¶b(°Æ®y¼Ð)
- .MinimumScale = xMin
- .MaximumScale = xMax
- .MaximumScaleIsAuto = True
- .MajorUnitIsAuto = True
- .MinorUnitIsAuto = True
- .Crosses = xlAutomatic
- .ScaleType = xlLinear
- End With
- End With
- End With
- Application.ScreenUpdating = True
- End If
- Application.OnTime T + TimeValue("00:01:00"), "GetDDE" '¶¡¹j5¤ÀÄÁ§ï¦¨TimeValue("00:05:00"),
- End Sub
½Æ»s¥N½X |
|