What the heck is Excel Camera Tool?
Excel’s camera tool is a pretty handy button that allows you to make interactive pictures of your data!
It comes especially handy when you need to copy Excel data that falls in non-adjacent ranges (since the camera tool generates an interactive picture, outline grouping can be used to hide the non-relevant columns/rows between the needed ranges)
Its interactivity also serves a great purpose when the numbers in your desired Excel range are subject to change depending on different scenarios.
Last but not least, using an interactive picture prevents any glitches that may occur with “hard-coded” ranges following the insertion/deletion of rows/columns.
You can activate the tool via File –> Options –> Customize Ribbon –> All Commands –> Add
How do I code it?
As you might notice, the code above looks pretty similar to the ones we’ve already used for:
- re-filtering and exporting the contents of a single pivot table to PowerPoint slides
- copying multiple pivot tables to PowerPoint slides
- copying multiple charts to PowerPoint slides
The major difference is that Excel considers interactive pictures generated through the Camera tool as shapes. Hence, they are represented through the following line in the VBA code:
As always, don’t forget to activate the Microsoft PowerPoint Object Library in Excel VBE environment in order to enable the interaction between Excel and PowerPoint
Happy VBA coding!