hi sir, I am writing a code for creating a chart in excel using vb.
Sub makechart()
Dim myRange As Range
Set myRange = Application.InputBox _
(Prompt:="select chart inputs", Type:=8)
Charts.Add
ActiveChart.ChartType = xlColumnClustered
Active.Chart.SetSourceData _
Source:=myRange, _
PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsNewSheet
End Sub
but this code show run time error 424. kindly tell me where I made a mistake.
Solved by X. J. in 18 mins