+ Reply to Thread
Results 1 to 7 of 7

Excel -> Powepoint

  1. #1
    Registered User
    Join Date
    04-19-2011
    Location
    Confusion
    MS-Off Ver
    Excel 2007
    Posts
    18

    Question Excel -> Powepoint

    I have the following code that I would like to apply to a spreadsheet at work. What it does is take the last graph on the active sheet, and pastes it to ppt. I would like to know what to add and where to be able to export multiple graphs on multiple sheets in the active workbook. Thank you in advanced for any assistance.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    05-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    315

    Re: Excel -> Powepoint

    You can loop through each sheet in the workbook and each chart on the sheet. Something like:

    Please Login or Register  to view this content.

    Dion

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Excel -> Powepoint

    Hello elfishio,

    I have contacted another moderator, Andy Pope, to have a look at your question. He is the resident chart expert.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Excel -> Powepoint

    mojo249 has provided you with the code needed to loop sheets/charts.

    So you just need to incorporate your existing code into the loop. Although the creation and destruction of powerpoint application and referencing to the presentation can be done once, outside of the loop,

    Post back if you further help.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    04-19-2011
    Location
    Confusion
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Excel -> Powepoint

    Thank you all for this assistance! I am going to apply this to my spreadsheet soon, and post back with the results.

  6. #6
    Registered User
    Join Date
    04-19-2011
    Location
    Confusion
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Excel -> Powepoint

    So I applied the originally qouted code within the new loop code provided by mojo, however it just pastes the same graph 3 times over, as opposed to each unique graph once. Is it computing to paste that graph to new slides for every graph in the worksheet?
    I apologize for the hand holding I am asking for, I just picked a complex program that I want to start with VBA on, and I happen to need it for work.

  7. #7
    Registered User
    Join Date
    04-19-2011
    Location
    Confusion
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Excel -> Powepoint

    update - changing the line "ChartNumber = 1" to Chartnumber = Varchart gave me charts 1 and 2 from sheet one, and chart 1 from sheet 1 as the 3rd slide, instead of chart 1 from sheet 2

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1