Hello everyone
I have question on how to get a chart to free float on my page. i have the following code and i added a section to try and do this but i can't seem to get it to work. any idea's?
Code
Charts.Add
ActiveChart.ChartType = xlXYScatter
ActiveChart.SetSourceData Source:=Sheets("Neg Bump").Range("D2:E" & NumOfRows), PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Neg Bump"
ActiveChart.Axes(xlValue).Select
With Selection
.TickLabelPosition = xlHigh
End With
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.ColorIndex = 41
End With
ActiveChart.Axes(xlCategory).Select
With Selection
.TickLabelPosition = xlHigh
End With
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.ColorIndex = 41
End With
With ActiveChart
.HasTitle = True
.HasLegend = False
.ChartTitle.Characters.Text = "Negative Bump"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Neg Bump Raised to Power"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Delta Pitch"
End With
ActiveChart.SeriesCollection(1).Trendlines.Add(Type:=xlLinear, Forward:=0, Backward:=0, DisplayEquation:=False, DisplayRSquared:=True).Select
ActiveChart.SeriesCollection(1).Trendlines.Add(Type:=xlLinear, Forward:=0, Backward:=0, DisplayEquation:=True, DisplayRSquared:=False).Select
'With ActiveChart.ChartObjects
' .Placement = xlFreeFloating
' .PrintObject = True
'End With
ActiveChart.SeriesCollection(1).Trendlines(1).DataLabel.Select
Selection.Left = 50
Selection.Top = 270
ActiveChart.SeriesCollection(1).Trendlines(2).DataLabel.Select
Selection.Left = 330
Selection.Top = 270
Display More