• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

PasteSpecial Command in Excel 2011?

sarkun

New Member
Hi,


I am trying to get a macro to work that takes a chart from excel and pastes it as a pictuer to powerpoint. It works when I run it on a pc in excel 2007 but if I try it on a mac in excel 2011 I get an object undefined error or it pastes it as a chart. Is there anyway to get this to work in excel 2011?


here is a piece of the code


For Each cht In ActiveSheet.ChartObjects

cht.Select

ActiveChart.CopyPicture

activeSlide.Shapes.PasteSpecial(DataType:=ppPasteMetafilePicture).Select


'Adjust the positioning of the Chart on Powerpoint Slide

newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 25

newPowerPoint.ActiveWindow.Selection.ShapeRange.Top = 125


activeSlide.Shapes(3).Width = 260

activeSlide.Shapes(3).Height = 200
 
Good day


There are known issues with the difference between VBA for PC and MAC excel VBA

This link http://www.rondebruin.nl/mac.htm has a lot of advice and code for the MAC VBA and a section on your problem.


You could use VM Ware Fusion and then you would be able to run the same code on both machines
 
Back
Top