I use Excel for basic statistical analysis of manufacturing and field return data as part of daily routine. I also use Excel for department budgeting. During these tasks, I frequently need to add information to my spreadsheets about my information sources (see Wikipedia entry on data provenance). Since much of my information comes to me in the form of email or web pages, a quick and easy way to document this information is to take a screenshot of the information and insert the information into an Excel comment.
For years I have included images in Excel comments using the manual procedure described here. This approach works well but is slow. I finally decided that there has to be a better way and I wrote a Visual Basic for Applications (VBA) macro that handles all the ugly details. Here is a link to this spreadsheet. The spreadsheet does use a VBA macro. If you are concerned about security, just look in the macro and see what it does.
To see a sample image (Saturn), just mouse over the cell with the little red triangle in the upper right corner.
A little discussion on how to use the macro is in order:
- Put an image into your clipboard (I use PicPick)
- Select the cell where you want to put the image
- Click the button labeled "Press"
- Your selected cell will now have little red triangle in the upper right corner. You will see your image when you mouse over this cell.
- I used a button for this example, but in my work I assign both a Quick Access toolbar icon and a keyboard shortcut to this macro.
Many thanks to the folks at these two web sites for posting code and clues that helped me put this macro together.