Search code examples
vbaexcelpowerpointpowerpoint-2010

Run code on excel spreadsheet straight from powerpoint VBA


I was wondering if it was possible to run code to create charts in excel that I will copy to a powerpoint presentation straight from powerpoint VBA? Or do I have to do it in excel?


Solution

  • You can do it directly from Powerpoint like this:

    Embedding an Excel chart

    If you have already created a chart in Excel, you can embed and link it to your PowerPoint presentation. When you embed an Excel chart in PowerPoint, any updates you make to the original Excel chart will automatically update in your presentation, as long as the files remain in the same location. This helps the data stay in sync, so you won't have incorrect or out-of-date information in your chart.

    • In PowerPoint, select the Insert tab.
    • Click the Object command in the Text group.
    • A dialog box will appear. Select Create from file, then click Browse
    • Locate and select the desired Excel file, then click Insert.
    • Check the box next to Link to file if you would like to link the data to the Excel chart. This will enable your chart to update itself when changes are made to the Excel chart.
    • Click OK. The chart will now appear in your presentation.