Did you know you can use Excel to Image snapshots of your Excel spreadsheets ? Sure you can. What is more you can use this feature directly from VBA to achieve some impressive feats. Today we will learn how to use the Excel Camera Tool!
Excel Camera Tool
Using the Excel Camera Tool[/caption]Let us start with exploring how to use the built-in Excel Camera Tool. The Excel Camera Tool is a button that let’s you create an image snapshot of any region of your Excel spreadsheet.
To use the Excel Camera Tool all you need to do is:
- Select an Excel Range
- Click on the Camera Tool Icon
- Click on any place in your Excel Worksheet
Add Excel Camera Tool Icon
Adding the Excel Camera Tool to your Quick Access Toolbar is easy. Just follow the steps below:
Select the Customize Quick Access Toolbar icon
Click on the arrow show the Quick Access Toolbar menu.
Next click More commands.
Browser Commands not in the toolbar
From the Choose commands from: menu select Commands not in the toolbar.
Now you should see an item called Camera in the list of Commands.
Add the Camera Tool
Now select Camera and hit the Add button to add the Camera tool to your Quick Access Toolbar.
Now you should see the Excel Camera Tool Icon in your Quick Access Toolbar:
.
Use Excel Camera Tool in VBA
The Camera Tool is very useful in your everyday work when you need to copy part of your Workbook as an Image i.e. send an image snapshot of an Excel Worksheet or Chart. Fortunately there is also an easy way to use it in VBA:
Sub TestCamera() Dim rng As Range Set rng = Range("A1:B2") 'Copy the Picture rng.CopyPicture Appearance:=xlScreen, Format:=xlPicture 'Past the Picture Range("A3").PasteSpecial Application.CutCopyMode = False End Sub
An example of how the macro works below:
Nice huh? Well this is the beginning of things you can do. There are lot of cool ideas you can use this feature to:
- Send image snapshot of Excel Worksheet via Email
- Save Excel Workbook as static image – replace each Worksheet with a static Image to protect your formulas and calculations