Sub Test()
Dim ChObj As ChartObject
Dim wsReport As Worksheet
Dim Top As Double
Dim Left As Double
Application.ScreenUpdating = False
Set wsReport = Worksheets("ReportSheet")
For Each ChObj In wsReport.ChartObjects
Top = ChObj.Top
Left = ChObj.Left
ChObj.Cut
wsReport.Pictures.Paste.Select
Selection.Top = Top
Selection.Left = Left
Next ChObj
Range("A1").Select
Application.ScreenUpdating = True
End Sub
This macro code is failing with the following error-
Unable to set the Top property of the Range class
Can someone please help me with this, Its very critical for me.
Thanks in advance.
Dim ChObj As ChartObject
Dim wsReport As Worksheet
Dim Top As Double
Dim Left As Double
Application.ScreenUpdating = False
Set wsReport = Worksheets("ReportSheet")
For Each ChObj In wsReport.ChartObjects
Top = ChObj.Top
Left = ChObj.Left
ChObj.Cut
wsReport.Pictures.Paste.Select
Selection.Top = Top
Selection.Left = Left
Next ChObj
Range("A1").Select
Application.ScreenUpdating = True
End Sub
This macro code is failing with the following error-
Unable to set the Top property of the Range class
Can someone please help me with this, Its very critical for me.
Thanks in advance.