ppt insert gif:Ppt can also play dynamic charts-PPT tutorial免费ppt模版下载-道格办公

Ppt can also play dynamic charts

Demonstrate dynamic charts in PPT

The idea of ​​this approach is to first make a dynamic chart model in Excel, and then "embed" this Excel file into the PPT. Then add a drop-down box in the PPT, and use the VBA macro to operate the drop-down box and embedded Excel to realize the dynamic switching of the chart. The finished effect is like this.

Production steps (the VBA code involved in the process, the welfare post at the end of the article is for everyone, so that everyone can copy it)

1. Make a dynamic chart model in Excel.

This is a common practice and will not be explained here. The result of the user's selection is recorded in the A1 cell of the dashboard sheet, which is the driving engine of the dynamic chart.

2. Embed the Excel file containing the dynamic chart into the PPT.

Copy the cell area where the chart is placed in the Excel file (note that it is the cell area behind the chart, not the chart itself), open a new page in the PPT, and paste selectively - the worksheet object, so that the Excel file "embedded "It's in this PPT.

3. Insert the drop-down box object in the PPT.

In PPT, develop tools - control, insert a drop-down box (scientific name is combo box). If your PPT does not have a development tool, please call it in File - Options - Customize Ribbon first.

But this drop-down box, PPT does not provide a place for you to specify the drop-down selection and save the selection result, what should I do? Here is the difficult point. Next, we need to use the macro code to read the selection list from Excel and assign it to the drop-down box.

4. Add options to the drop-down box.

This needs to be added using macro code. Moreover, the macro code needs to be placed in the Got_Focus event of the drop-down box, because it will disappear every time the PPT is closed and needs to be reassigned.

Press Alt+F11 in PPT to come to the VBE window, which is the same as in Excel. Select an object like slide1 or slide2 on the left (there is a small PPT icon in front of it), and enter the following code in the code area on the right:

What this code does is to open the Excel file embedded in the PPT every time the PPT is shown and the drop-down box is selected, read the A5:A17 range of the dashboard worksheet, and put these selected items Assigned to the drop-down box.

Xiaobai needs to pay attention, the above code can not be used directly by copying it to your PPT, you need to modify the object name to match, such as ComboBox1, Shapes(1), etc.

5. Write the action after the drop-down box is selected.

Below the previous process, continue to write the action after the user selects the drop-down box.

When the user pulls down the selection, the change event of the combo box will be triggered, execute this code, fill the selection result of the drop-down box into the A1 cell of the dashboard worksheet of the embedded Excel file, and drive the model to dynamically switch charts.

6. Write the action when exiting the PPT show.

If the PPT turns pages or exits the show, close the embedded Excel file.

7. Show the PPT test dynamic chart.

Now, the exciting time is coming! Show the PPT, click the drop-down box with the mouse, and you may see a flash of the assigned value. At this time, the drop-down box may only have 1 line, and then click the drop-down box to fully expand it (this should be a small bug). Select an option and the chart on the right should switch dynamically.

It may be a bit slow for the first selection, because after opening the embedded Excel file, the subsequent selection will be completely normal and respond in seconds. success.

8. Save the PPT file.

When saving the file, it will prompt that it contains macros, and choose to save it as a file with a suffix of .pptm with macros. There will be a macro prompt the next time you open it, just choose to enable macros.

9. Data update in the future.

After Excel is embedded in the PPT, the separate Excel file is not needed, so you should make sure to embed it after the Excel model is complete. When you need to update the data in the future, you should update the embedded objects in the PPT. Do not directly double-click to open, as the window is too small and inconvenient to operate. Right click on the embedded object - worksheet object - open, this will open a large Excel window for you to edit, which is much more convenient.

how do you feel? Isn't it super superb! ~~ This dynamic chart + PPT technology was originally created by Mr. Liu Wanxiang.

There are still many essences in dynamic charts. If you want to master them, you must study them systematically, and you can play them well by following the industry masters!

Articles are uploaded by users and are for non-commercial browsing only. Posted by: Lomu, please indicate the source: https://www.daogebangong.com/en/articles/detail/Ppt%20can%20also%20play%20dynamic%20charts.html

Like (810)
Reward 支付宝扫一扫 支付宝扫一扫
single-end

Related Suggestion