My code now as follows.
It doesn't like:-
"ActiveChart.SetSourceData Source:=Sheets("AF objs % responses").Range("myRng")" and crashes at that point.
What am I doing wrong?
Dim myRng As Range
Prompt = "Select cells for work"
Title = "Select a Range"
SetmyRng = Application.InputBox(Prompt:=Prompt, Title:=Title)
Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlUserDefined, TypeName:="Default"
ActiveChart.SetSourceData Source:=Sheets("AF objs % responses").Range("myRng")
ActiveChart.Location Where:=xlLocationAsObject, Name:="AF objs % responses"
ActiveChart.ChartTitle.Select
Selection.Characters.Text = "P"
Selection.AutoScaleFont = False
With Selection.Characters(Start:=1, Length:=1).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
ActiveChart.Axes(xlValue).Select
End Sub