|
こんばんは。
素人的な質問ですが、複数のグラフを同一シート内に表示させるのはどうやったらいいんでしょうか?
また、単体でグラフを移動させているのですが、うまく動作しません。
以下のようになっています。
Sub 乱暴()
'
' 乱暴 Macro
' マクロ記録日 : 2006/1/17 ユーザー名 :
'
'
Range("L2").Select
Range(Selection, Selection.End(xlDown)).Select
Charts.Add
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
ActiveChart.SetSourceData Source:=Sheets("乱暴").Range("L2:L12001"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).XValues = "=乱暴!R2C150:R12001C150"
ActiveChart.Location Where:=xlLocationAsObject, Name:="グラフ"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "乱暴"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "時間"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "s"
End With
Selection.Delete
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScaleIsAuto = True
.MaximumScale = 60
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
With ActiveSheet.ChartObjects(1)
.Top = 14
.Left = 54
End With
End Sub
Sub 乱暴2()
'
' 乱暴2 Macro
' マクロ記録日 : 2006/1/18 ユーザー名 :
'
'
Sheets("乱暴").Select
Range("M2").Select
Range(Selection, Selection.End(xlDown)).Select
Charts.Add
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
ActiveChart.SetSourceData Source:=Sheets("乱暴タ").Range("M2:M12001"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).XValues = "=乱暴!R2C150:R12001C150"
ActiveChart.Location Where:=xlLocationAsObject, Name:="乱暴フ"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "乱暴"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "時間"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "s"
End With
ActiveChart.Legend.Select
Selection.Delete
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScaleIsAuto = True
.MaximumScale = 60
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
With ActiveSheet.ChartObjects(2)
.Top = 252
.Left = 54
End With
End Sub
Sub 乱暴2()
'
' 乱暴3 Macro
' マクロ記録日 : 2006/1/18 ユーザー名 : reo
'
'
Charts.Add
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
ActiveChart.SetSourceData Source:=Sheets("乱暴").Range("N2:N12001"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).XValues = "=乱暴!R2C150:R12001C150"
ActiveChart.Location Where:=xlLocationAsObject, Name:="乱暴"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "乱暴"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "時間"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "s"
End With
ActiveChart.Legend.Select
Selection.Delete
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScaleIsAuto = True
.MaximumScale = 60
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
With ActiveSheet.ChartObjects(3)
.Top = 504
.Left = 54
End With
End Sub
ご教授のほどよろしくお願いします。
|
|