I have recorded a macro in excel using Record Macro option
. However, when I run it, I get the Error 438
and the error box displays Object does not support property or method
. Here is the generated macro code. Can someone explain here:
Sub Macro1()
'
' Macro1 Macro
'
'
ActiveCell.Range("A1:C1").Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("'Sheet2'!$A$4:$C$4")
ActiveChart.ChartType = xlPie
Application.CutCopyMode = True
Selection.Cut
Sheets("Sheet3").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
ActiveCell.Offset(1, 0).Range("A1").Select
When I debug, I get the error in Selection.Cut
. I am wondering how come a recorded macro generated not working code