I am trying to set the define a range variable and then use this range variable as a source for an Excel chart. But I am getting the Object Required Error when i run my Macro at Set rng =
Sub temp3()
'
' temp3 Macro
'
Dim rng As Range
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Set rng = Range(Selection, Selection.End(xlToRight)).Select
ActiveSheet.Shapes.AddChart2(332, xlLineMarkers).Select
ActiveChart.SetSourceData Source:=rng
End Sub