ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

VBA µe¹Ï¤è¦¡½Ð¯q?????

¦^´_ 1# iverson105

¿@ÁY³o¼Ë,¸Õ¸Õ¬Ý
Sub ALL_PLOT()
Dim x As Integer
Sheets("R2R_analysis").Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlXYScatter
Application.ScreenUpdating = False
For x = 2 To Worksheets.Count
   ActiveChart.SeriesCollection.NewSeries
   ActiveChart.SeriesCollection(x - 1).Name = Sheets("¤u§@ªí1 (" & x & ")").Range("U1")
   ActiveChart.SeriesCollection(x - 1).XValues = Sheets("¤u§@ªí1 (" & x & ")").Range("A2:A20000")
   ActiveChart.SeriesCollection(x - 1).Values = Sheets("¤u§@ªí1 (" & x & ")").Range("D2:D20000")
Next
Application.ScreenUpdating = True

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ActiveChart.ApplyLayout (4)

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim xRg As Range
Dim xChart As ChartObject
Set xRg = Range("A20:J50")
Set xChart = ActiveSheet.ChartObjects(1)
With xChart
   .Top = xRg(1).Top
   .Left = xRg(1).Left
   .Width = xRg.Width
   .Height = xRg.Height
End With

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ActiveChart.SetElement (msoElementChartTitleAboveChart)
Selection.Caption = "R2R_Ave.G.R."
ActiveChart.SetElement (msoElementPrimaryValueAxisTitleRotated)
Selection.Caption = "G.R.(mm/hr)"
ActiveChart.SetElement (msoElementPrimaryCategoryAxisTitleAdjacentToAxis)
Selection.Caption = "Length(mm)"
ActiveSheet.ChartObjects(1).Activate
ActiveChart.Axes(xlCategory).Select
ActiveChart.Axes(xlCategory).MinimumScale = 0
ActiveChart.Axes(xlCategory).MaximumScale = 1100
ActiveChart.Axes(xlCategory).MajorUnit = 100
ActiveChart.Axes(xlCategory).MinorUnit = 50
ActiveChart.Axes(xlCategory).CrossesAt = 0
ActiveChart.Axes(xlValue).CrossesAt = 0
ActiveChart.SetElement (msoElementPrimaryValueGridLinesMajor)
ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesMajor)
Application.ScreenUpdating = True
End Sub

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD