HI,
I have X,Y,Z coordinates of points(10 points) on a line. This line changes according to Time.. for each time change line changes and points on it also changes. Suppose it changes 5 times So I will have 5 such XYZ values for those 10 points. I have data for each time pasted in different columns A,B,C,D.....in manner X,Y,Z,X,Y,Z and so on.. means X will be in Column A, Y will be in Column B, Z will be in Column C, Again for different time X will be in D, Y will be in E and so on, to plot those points I am using
Sub Chartone()
Dim cht As ChartObject
Range("A:A,B:B").Select
ActiveSheet.Shapes.AddChart2(269, xlBubble3DEffect).Select
ActiveChart.SetSourceData Source:=Range("Sheet2!$A:$A,Sheet2!$B:$B")
ActiveChart.Parent.Name = "TOPTime1"
Set cht = ActiveSheet.ChartObjects("TOPTime1")
cht.Chart.HasTitle = True
cht.Chart.ChartTitle.Text = "TOP-Time1"
With cht
.Top = Range("A100").Top
''.Width = Range("A1:G12").Width
''.Height = Range("A1:G12").Height
.Left = Range("A100").Left
End With
With ActiveSheet.ChartObjects("TOPTime1").Chart
.Axes(xlValue).MinimumScale = 5000
.Axes(xlValue).MaximumScale = 7000
.Axes(xlCategory).MinimumScale = 0
.Axes(xlCategory).MaximumScale = 1400
End With
Range("A:A,C:C").Select
ActiveSheet.Shapes.AddChart2(269, xlBubble3DEffect).Select
ActiveChart.SetSourceData Source:=Range("Sheet2!$A:$A,Sheet2!$C:$C")
ActiveChart.Parent.Name = "FrontTime1"
Set cht = ActiveSheet.ChartObjects("FrontTime1")
cht.Chart.HasTitle = True
cht.Chart.ChartTitle.Text = "Front-Time1"
With cht
.Top = Range("A114").Top
''.Width = Range("A1:G12").Width
''.Height = Range("A1:G12").Height
.Left = Range("A114").Left
End With
With ActiveSheet.ChartObjects("FrontTime1").Chart
.Axes(xlValue).MinimumScale = 0
.Axes(xlValue).MaximumScale = 1400
.Axes(xlCategory).MinimumScale = 0
.Axes(xlCategory).MaximumScale = 1400
End With
Range("B:B,C:C").Select
ActiveSheet.Shapes.AddChart2(269, xlBubble3DEffect).Select
ActiveChart.SetSourceData Source:=Range("Sheet2!$B:$B,Sheet2!$C:$C")
ActiveChart.Parent.Name = "SideTime1"
Set cht = ActiveSheet.ChartObjects("SideTime1")
cht.Chart.HasTitle = True
cht.Chart.ChartTitle.Text = "Side-Time1"
With cht
.Top = Range("I114").Top
''.Width = Range("A1:G12").Width
''.Height = Range("A1:G12").Height
.Left = Range("I114").Left
End With
With ActiveSheet.ChartObjects("SideTime1").Chart
.Axes(xlValue).MinimumScale = 0
.Axes(xlValue).MaximumScale = 1400
.Axes(xlCategory).MinimumScale = 5000
.Axes(xlCategory).MaximumScale = 7000
End With
End Sub
Here I am plotting XY,XZ,YZ using A,B,C columns..Again for next step XY,XZ,YZ using D,E,F columns..
I am interested to use Scroll bar or Spin button so that within same plot charts I can plot values for other time steps...Means I will have three charts__XY,XZ, and YZ..and in this charts by scrolling bar or button I will change Steps..So instead of plotting 15 charts in 3 charts(XY,XZ,YZ) it will be done by changing the scroll button or spinning it..
(plot axes ranges will be same)
Please help me in doing this thing??
I have X,Y,Z coordinates of points(10 points) on a line. This line changes according to Time.. for each time change line changes and points on it also changes. Suppose it changes 5 times So I will have 5 such XYZ values for those 10 points. I have data for each time pasted in different columns A,B,C,D.....in manner X,Y,Z,X,Y,Z and so on.. means X will be in Column A, Y will be in Column B, Z will be in Column C, Again for different time X will be in D, Y will be in E and so on, to plot those points I am using
Sub Chartone()
Dim cht As ChartObject
Range("A:A,B:B").Select
ActiveSheet.Shapes.AddChart2(269, xlBubble3DEffect).Select
ActiveChart.SetSourceData Source:=Range("Sheet2!$A:$A,Sheet2!$B:$B")
ActiveChart.Parent.Name = "TOPTime1"
Set cht = ActiveSheet.ChartObjects("TOPTime1")
cht.Chart.HasTitle = True
cht.Chart.ChartTitle.Text = "TOP-Time1"
With cht
.Top = Range("A100").Top
''.Width = Range("A1:G12").Width
''.Height = Range("A1:G12").Height
.Left = Range("A100").Left
End With
With ActiveSheet.ChartObjects("TOPTime1").Chart
.Axes(xlValue).MinimumScale = 5000
.Axes(xlValue).MaximumScale = 7000
.Axes(xlCategory).MinimumScale = 0
.Axes(xlCategory).MaximumScale = 1400
End With
Range("A:A,C:C").Select
ActiveSheet.Shapes.AddChart2(269, xlBubble3DEffect).Select
ActiveChart.SetSourceData Source:=Range("Sheet2!$A:$A,Sheet2!$C:$C")
ActiveChart.Parent.Name = "FrontTime1"
Set cht = ActiveSheet.ChartObjects("FrontTime1")
cht.Chart.HasTitle = True
cht.Chart.ChartTitle.Text = "Front-Time1"
With cht
.Top = Range("A114").Top
''.Width = Range("A1:G12").Width
''.Height = Range("A1:G12").Height
.Left = Range("A114").Left
End With
With ActiveSheet.ChartObjects("FrontTime1").Chart
.Axes(xlValue).MinimumScale = 0
.Axes(xlValue).MaximumScale = 1400
.Axes(xlCategory).MinimumScale = 0
.Axes(xlCategory).MaximumScale = 1400
End With
Range("B:B,C:C").Select
ActiveSheet.Shapes.AddChart2(269, xlBubble3DEffect).Select
ActiveChart.SetSourceData Source:=Range("Sheet2!$B:$B,Sheet2!$C:$C")
ActiveChart.Parent.Name = "SideTime1"
Set cht = ActiveSheet.ChartObjects("SideTime1")
cht.Chart.HasTitle = True
cht.Chart.ChartTitle.Text = "Side-Time1"
With cht
.Top = Range("I114").Top
''.Width = Range("A1:G12").Width
''.Height = Range("A1:G12").Height
.Left = Range("I114").Left
End With
With ActiveSheet.ChartObjects("SideTime1").Chart
.Axes(xlValue).MinimumScale = 0
.Axes(xlValue).MaximumScale = 1400
.Axes(xlCategory).MinimumScale = 5000
.Axes(xlCategory).MaximumScale = 7000
End With
End Sub
Here I am plotting XY,XZ,YZ using A,B,C columns..Again for next step XY,XZ,YZ using D,E,F columns..
I am interested to use Scroll bar or Spin button so that within same plot charts I can plot values for other time steps...Means I will have three charts__XY,XZ, and YZ..and in this charts by scrolling bar or button I will change Steps..So instead of plotting 15 charts in 3 charts(XY,XZ,YZ) it will be done by changing the scroll button or spinning it..
(plot axes ranges will be same)
Please help me in doing this thing??