Share via

macro to 'edit data'

Anonymous
2015-08-11T14:08:00+00:00

I have tried a few bits of VBA code that I found by searching Microsoft sites etc but haven't got one working yet. I want to write a macro that finds all charts in a deck and one by one 'edits data' and closes 'chart in microsoft powerpoint.xls' immediately, thereby allowing updated data in a spreadsheet linked to 'chart in microsoft powerpoint.xls' to feed into the powerpoint chart. how would one begin to write such a macro? It seems to have something to do with chartdata and activate, then close workbook?

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2015-08-11T14:37:26+00:00

    I have only tried to do it for one single chart so far but ultimately I want to write code to edit and close 40 or 50 standard ppt charts to allow new data to feed in. The charts have not been inserted with ppt insert chart command. Most have been copied from an initial chart and then the workbook has been linked to a seperate external workbook that I update regularly. I can go through the deck manually, doing 'edit data' and closing the workbook that opens each time to update the charts but I do 5 decks each with 50 charts every 4 weeks so a macro would save a lot of time. my test for one chart was this (usually I edit recorded macros in excel)

    With chartdata

    activate

    close workbook

    End with

    Was this answer helpful?

    0 comments No comments
  2. Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
    2015-08-11T14:14:23+00:00

    It'll depend on how the charts got there in the first place.

    Are they embedded or linked Excel charts or are they inserted via PPT's Insert | Chart command?

    What have you tried so far?  Show the code examples and tell us what error messages appeared/other problems.

    Was this answer helpful?

    0 comments No comments