PDA

View Full Version : Copy Range into Powerpoint



slt_roopan
07-31-2013, 06:54 PM
HI - I'm a newbie to VBA, The code above is very useful. But I get an error in

Copy_Paste_to_PowerPoint ppApp, ppSlide, Sheet1, Sheet1.ChartObjects(1).Chart, xl_Bitmap

Error message is

Run time error 1004
Method 'ChartObjects' of object'_'worksheet' failed.


Also I have the following questions to ask
1. Do I have to use both the subroutines
2. If I use only the top one "Sub Copy_Paste_to_PowerPoint() " , the macro still works and allows me to copy the excel - but not from the range I wanted to copy.

Ref: Copy/Paste Excel Range/Chart into Powerpoint VBA (http://www.excelfox.com/forum/f13/copy-paste-excel-range-chart-into-powerpoint-vba-541)

Kindly advise.

slt_roopan
07-31-2013, 07:40 PM
Also forgot to mention that I'm using office 2007.

Admin
07-31-2013, 10:08 PM
Hi

If you want to copy a range, use

Copy_Paste_to_PowerPoint ppApp, ppSlide, Sheet1, Sheet1.Range("A1:K50"), xl_Bitmap

And yes, you have to use both the subs.