C
clr
Hi All.......
I have created a chart by macro. It sets on the same sheet as my data from
which it is drawn. As I scroll the data, the charts move with the
scrolling. I would like it to "float" in the same spot on the screen and
have the data scroll by behind it. Is this a doable thing?
TIA
Vaya con Dios,
Chuck, CABGx3
Sub CholesterolChart()
ActiveSheet.ChartObjects.Delete
Range("Maximum").Value = Range("bx30").Value
Range("Minimum").Value = Range("bw30").Value
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData
Source:=Sheets("BloodTests").Range("B23:bv23"), PlotBy _
:=xlRows
ActiveChart.SeriesCollection(1).XValues = "=BloodTests!R26C2:R26C49"
ActiveChart.SeriesCollection(1).Values = _
"=BloodTests!Cholesterol"
ActiveChart.SeriesCollection(1).Name = "Cholesterol"
ActiveChart.Location Where:=xlLocationAsObject, Name:="BloodTests"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Cholesterol"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
ActiveChart.HasLegend = False
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = _
"=BloodTests!Maximum"
ActiveChart.SeriesCollection(2).Name = "=BloodTests!R22C1"
ActiveChart.SeriesCollection(3).Values = _
"=BloodTests!Minimum"
ActiveChart.SeriesCollection(3).Name = "=BloodTests!R23C1"
'ActiveWindow.Visible = False
End Sub
I have created a chart by macro. It sets on the same sheet as my data from
which it is drawn. As I scroll the data, the charts move with the
scrolling. I would like it to "float" in the same spot on the screen and
have the data scroll by behind it. Is this a doable thing?
TIA
Vaya con Dios,
Chuck, CABGx3
Sub CholesterolChart()
ActiveSheet.ChartObjects.Delete
Range("Maximum").Value = Range("bx30").Value
Range("Minimum").Value = Range("bw30").Value
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData
Source:=Sheets("BloodTests").Range("B23:bv23"), PlotBy _
:=xlRows
ActiveChart.SeriesCollection(1).XValues = "=BloodTests!R26C2:R26C49"
ActiveChart.SeriesCollection(1).Values = _
"=BloodTests!Cholesterol"
ActiveChart.SeriesCollection(1).Name = "Cholesterol"
ActiveChart.Location Where:=xlLocationAsObject, Name:="BloodTests"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Cholesterol"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
ActiveChart.HasLegend = False
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = _
"=BloodTests!Maximum"
ActiveChart.SeriesCollection(2).Name = "=BloodTests!R22C1"
ActiveChart.SeriesCollection(3).Values = _
"=BloodTests!Minimum"
ActiveChart.SeriesCollection(3).Name = "=BloodTests!R23C1"
'ActiveWindow.Visible = False
End Sub