+ Reply to Thread
Results 1 to 6 of 6

Attempting to edit Excel chart data in PowerPoint

  1. #1
    Registered User
    Join Date
    04-17-2013
    Location
    St. Louis
    MS-Off Ver
    Excel 2010
    Posts
    36

    Attempting to edit Excel chart data in PowerPoint

    Hi all. I'm trying to edit the data of a chart in a PowerPoint presentation that is linked to Excel. Here is a code I found that looks similar to what I want to do

    Please Login or Register  to view this content.
    When I run it, it says "User-defined type not defined" though. Here's what I have:

    This macro is in PowerPoint, not Excel.
    The chart is on slide 2 of the PowerPoint presentation and is named "Chart7".
    The Excel workbook is named Workbook1 and the first sheet on it that has the chart data is called Sheet1. It will already be open at the time that the macro is run.
    The macro is designed to be run by clicking a button while the PowerPoint presentation is running.

    What I ideally want to do is be able to edit the excel sheet in any way I want (setting B2 to 1 is just an example). If there's any way I can be more specific, please let me know. Any help would be greatly appreciated.

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

    Re: Attempting to edit Excel chart data in PowerPoint

    Did you include a reference to the excel library within the powerpoint project?

    In VBE use menu Tools > References.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    04-17-2013
    Location
    St. Louis
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Attempting to edit Excel chart data in PowerPoint

    Good call! Thank you very much!

    I've got it working ALMOST exactly how I want it now. There's one more thing I'd like it to do, but I'm not sure it's possible. First, here's the current code now:

    Please Login or Register  to view this content.
    So, now if I'm in the presentation and click the button the macro is assigned to, it'll open Excel, change some data, save it, close Excel, and resume the presentation. However, it does all of this in the foreground. Is there a way to make it so that the PowerPoint presentation is always the screen that people see when all of this is running? Basically, I don't want the audience to see that all of this opening, editing, and closing is going on behind the scenes.

    Edit: I did find this thread which is similar: http://www.excelforum.com/excel-prog...oreground.html

    and tried using this code above the sub

    Please Login or Register  to view this content.
    and this code within the sub

    Please Login or Register  to view this content.
    but the macro does nothing at all when I run it.

    I've also tried variations of
    Please Login or Register  to view this content.
    which include using PowerPoint and Excel instead of ActivePresentation and making them true or false.
    Last edited by DPWM; 06-24-2013 at 10:23 AM.

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

    Re: Attempting to edit Excel chart data in PowerPoint

    I don't believe you can automate the PPT chart without it being activated.

    Why not simply have 2 slides, instead of updating on the fly?

  5. #5
    Registered User
    Join Date
    04-17-2013
    Location
    St. Louis
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Attempting to edit Excel chart data in PowerPoint

    Unfortunately, I'd need much more than 2 slides because I'd like to eventually have at least 6 scenarios (6 buttons) that the user can cycle through so splitting it up between slides won't work here.

    Alternatively, instead of hiding Excel, is there a way to "freeze" PowerPoint as what's viewable or always keep it on top?

  6. #6
    Registered User
    Join Date
    04-17-2013
    Location
    St. Louis
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Attempting to edit Excel chart data in PowerPoint

    Actually, sometimes the most simple solution is the best. I just realized that I can minimize make the size of the Excel window the smallest it can be and drag it to a corner before I start the PowerPoint Presentation. That way, it'll still flash, but it won't really be noticed.

+ 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