- ©«¤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
|
¦^´_ 33# c_c_lai
«·s קï¾ã²z §Aªº µ{¦¡½X , ½Ð±N¥þ³¡ªºµ{¦¡½X ½Æ»s¦b¦P¤@¼Ò²Õ¤¤.- Dim xRow(1 To 6), yCol(1 To 6), cWidth(1 To 6), cHeight(1 To 6), xText(1 To 6)
- Dim Chart_Source(1 To 6)
- Private Sub °}¦C³]©w(ShName As String)
- Dim Rng As Range
- xRow(1) = IIf(ShName = "Omega", 4, 1)
- xRow(2) = IIf(ShName = "Omega", 18, 16)
- xRow(3) = IIf(ShName = "Omega", 4, 1)
- xRow(4) = IIf(ShName = "Omega", 18, 16)
- xRow(5) = IIf(ShName = "Omega", 4, 1)
- xRow(6) = 31
- yCol(1) = IIf(ShName = "Omega", 55, 1)
- yCol(2) = IIf(ShName = "Omega", 35, 1)
- yCol(3) = IIf(ShName = "Omega", 39, 5)
- yCol(4) = IIf(ShName = "Omega", 39, 5)
- yCol(5) = IIf(ShName = "Omega", 43, 9)
- yCol(6) = 1
- cWidth(1) = IIf(ShName = "Omega", 209, 222)
- cWidth(2) = IIf(ShName = "Omega", 209, 222)
- cWidth(3) = 209
- cWidth(4) = 209
- cWidth(5) = 405
- cWidth(6) = 810
- cHeight(1) = 240
- cHeight(2) = 240
- cHeight(3) = 240
- cHeight(4) = 240
- cHeight(5) = IIf(ShName = "Omega", 485, 488)
- cHeight(6) = 480
- xText(1) = "¥D¤O¬É¤J"
- xText(2) = "¤O®t"
- xText(3) = "®ø¤Æ¤O"
- xText(4) = "§¡®t(¤j¤á)"
- xText(5) = "¥D¤O¡B´²¤á¡B»P¦¨¥æ»ù¡B¶q"
- xText(6) = "¦¨¥æ»ù»P¦¨¥æ¶q"
- With Sheets("²Îp¹Ïªí")
- Set Rng = .Range("A1").CurrentRegion
- Set Chart_Source(1) = Union(Rng.Columns(2), Rng.Columns(27))
- Set Chart_Source(2) = Union(Rng.Columns(2), Rng.Columns(28))
- Set Chart_Source(3) = Union(Rng.Columns(2), Rng.Columns(29))
- Set Chart_Source(4) = Union(Rng.Columns(2), Rng.Columns(30))
- Set Chart_Source(5) = Union(Rng.Columns(2), Rng.Columns(6), Rng.Columns(9), Rng.Columns(10), Rng.Columns(22))
- Set Chart_Source(6) = Union(Rng.Columns(2), Rng.Columns(6), Rng.Columns(22))
- End With
- End Sub
- Sub ¥þ³¡«Ã¸() '«Ã¸²Îp¹Ïªí ¤]¬O¥Î¦¹µ{§Ç
- »s¹Ïµ{§Ç Sheets(Array("²Îp¹Ïªí", "Omega"))
- End Sub
- Sub «Ã¸Omega()
- »s¹Ïµ{§Ç Sheets(Array("Omega"))
- End Sub
- Private Sub »s¹Ïµ{§Ç(xlSh As Sheets) '¥þ³¡«Ã¸
- Dim Sh As Worksheet, xi As Integer
- For Each Sh In xlSh '"'Sheets(Array("²Îp¹Ïªí", "Omega"))
- Sh.ChartObjects.Delete
- °}¦C³]©w Sh.Name
- For xi = 1 To IIf(Sh.Name = "Omega", 5, 6)
- With Sh.ChartObjects.Add(Sh.Cells(xRow(xi), yCol(xi)).Left, Sh.Cells(xRow(xi), yCol(xi)).Top, cWidth(xi), cHeight(xi)).Chart
- .ChartType = IIf(xi >= 5, xlLine, xlColumnStacked) 'xlLine-> §é½u¹Ï 'xlColumnStacke-> °ïÅ|ª½±ø¹Ï
- .SetSourceData Source:=Chart_Source(xi)
- .HasLegend = 0 '¹Ïªíªº¹Ï¨Ò: ¤£¥i¨£
- .SeriesCollection(1).AxisGroup = IIf(xi >= 5, 2, 1)
- With .Axes(xlCategory) 'X®y¼Ð¶b
- .CategoryType = xlCategoryScale
- .TickLabels.NumberFormatLocal = "hh:mm"
- .MinorTickMark = xlNone
- .Border.Weight = xlHairline
- .Border.LineStyle = xlNone
- .TickLabelPosition = xlLow
- .TickLabels.Font.Size = 10
- End With
- '''''''''''''''''''''''''
- If .ChartType = xlColumnStacked Then '°ïÅ|ª½±ø¹Ï
- .SeriesCollection(1).Shadow = False '¹Ïªí¤¤ªº¼Æ¦C(1)
- .SeriesCollection(1).InvertIfNegative = True
- With .SeriesCollection(1).Border
- .Weight = xlHairline
- .LineStyle = xlNone
- End With
- With .SeriesCollection(1).Interior
- .ColorIndex = 5
- .PatternColorIndex = 42
- .Pattern = xlSolid
- End With
- Else '§é½u¹Ï
- .HasLegend = True
- .Legend.Top = 1
- .Legend.Position = xlCorner
- .SeriesCollection(1).MarkerStyle = xlNone
- With .Legend.Border
- .Weight = xlHairline
- .LineStyle = xlNone
- End With
- End If
- '''''''''''''''''''''''''''
- With .Axes(xlValue).TickLabels.Font 'Y®y¼Ð¶b¤W¨è«×ªº¨è«×¼ÐÅÒªº¦rÅé
- .FontStyle = "¼Ð·Ç"
- .Size = 10
- End With
- .HasTitle = True '¹Ïªíªº¼ÐÃD ¥i¨£
- With .ChartTitle '¹Ïªíªº¼ÐÃD
- .Top = 1
- .text = xText(xi)
- .Font.Size = 14
- End With
- With .PlotArea ' ¹ÏªíªºÃ¸¹Ï°Ï
- .Top = 1
- .Left = 1
- .Width = cWidth
- .Height = cHeight
- .Interior.ColorIndex = xlNone
- End With
- End With
- Next
- Next
- End Sub
½Æ»s¥N½X |
|