rohanmalhotra1983
New Member
- Joined
- Mar 27, 2017
- Messages
- 6
Hi all
I am writing a VBA code to copy charts from Excel to Powerpoint. The code is running fine in debug mode, however, gives an error in compile mode. Can anyone please help?
Thanks in advance.
I am writing a VBA code to copy charts from Excel to Powerpoint. The code is running fine in debug mode, however, gives an error in compile mode. Can anyone please help?
Thanks in advance.
Code:
MBSheet.Activate
MBSheet.ChartObjects("Chart 1").Chart.ChartArea.Copy
mySlide.Select
With mySlide
.Application.CommandBars.ExecuteMso ("PasteExcelChartSourceFormatting")
With .Application.ActiveWindow.Selection.ShapeRange
.Top = Application.CentimetersToPoints(3.9)
.Left = Application.CentimetersToPoints(1.57)
.Height = Application.CentimetersToPoints(11.93)
.Width = Application.CentimetersToPoints(10.96)
End With
End With