Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Adding Excel charts to PowerPoint presentation in Office 2003

In Office 2000 this code worked perfectly:

Dim xlCurrChart As Excel.Chart
Dim xlBook As Excel.Workbook
Dim pptShape As PowerPoint.Shape

Set pptShape = rpptTarget.Shapes.AddOLEObject(Width:=fDefaultWidt h,
Height:=fDefaultHeight, ClassName:="Excel.Sheet")

Set xlBook = pptShape.OLEFormat.Object
Set xlCurrChart = xlBook.Charts.Add()

But now testing this with Office 2003, the last line raises an error. The
weird thing is that this code is in a loop and the error is only raised the
first time that this code fires. After the first loop, the code no longer
raises any errors and works fine.

The error message is:
Error number: - 2147417851 method '~' of object '~' failed.

Any ideas?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel problem with editing in a PowerPoint Presentation FrankTimJr Excel Discussion (Misc queries) 0 January 18th 10 09:56 PM
office 07: auto powerpoint charts using named range data in excel robert2b Charts and Charting in Excel 0 November 28th 07 11:15 PM
Linking Several Charts to a PowerPoint Presentation Rich Links and Linking in Excel 0 April 2nd 05 10:02 PM
Open Powerpoint Presentation via Excel VBA code hurlbut777 Excel Programming 3 January 7th 05 12:42 AM
Creating a powerpoint presentation from MS-Excel Shilps[_2_] Excel Programming 3 August 1st 04 03:47 AM


All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"