MrExcel's Learn Excel #785 - Macro Pictures

If you like this content, please consider visiting the video on YouTube and subscribe to the MrExcel Channel to show your support!
This video has been published on Jan 15, 2009.
Episode 322 talked about adding pop-up pictures to a cell. Devin asks if there is a way to add many pictures at once. In Episode 785, I use some macro code from page 764 in the book to quickly add pop-up pictures to many cells.

This blog is the video podcast companion to the book, Learn Excel 97-2007 from MrExcel. Download a new two minute video every workday to learn one of the 377 tips from the book!
maxresdefault.jpg


Transcript of the video:
Hey. Welcome back to the MrExcel netcast. I'm Bill Jelen.
I got a great email from Devin in New York.
Devin said he just recently discovered the podcast, and one of the very first podcasts that he saw was episode 322, and, in that episode, it showed how to add a picture to a comment.
That way, the picture would always sort with the cell, and he said, that's great but I need to do this to hundreds of different cells and it's very time-consuming to go through and add a picture to a cell as I described.
Well, I want to encourage Devin, and actually everyone watching the podcast, to download the book.
You know, there's a book that goes with the podcast.
It's free to download.
Just go to mrexcel.com/pod600.html, and in that book, on page 764, I talked about this very problem of adding pictures to a cell, and, basically, what you need is you need some way to have the picture name, the file name, described by the cells, you know.
So, I have some captions here in D, but what I did was, over here in column A, is I put in the file names and also, because some of my pictures are horizontal and some are vertical, I put in the height and width that I wanted the comment to be.
Now, let's take a look at the code.
It's a really short piece of code.
Basically, it says we're going to go from row 2 to row 7 and build the picture name.
So, my pictures are in a folder called C:\PICTURES.
Grab the name from the column A and add .jpg to the end.
Then, we use the ADDCOMMENT method and I specify what the picture is, get the height from column 2, the width from column 3.
Now, let's go ahead and run this.
There we go.
That's how fast it is, and when we go back now, we should be able to see, as we hover over each item in the list, we'll see the various pictures popped up.
Those were all just added by the macro.
Great little way to put, you know, maybe item pictures or something with a cell, and much faster to do it this way than to go through and do it individually.
Now, by the way, all these pictures here are from Trinidad.
Someone saw that I was doing some seminars down in the southern Caribbean.
They said, hey, you ought to do podcasts from the beach.
Well, I didn't have the camera so I couldn't do the podcast, but I did bring back some pictures.
Great picture here of a leatherback turtle.
These 800 pound turtles came up on the beach in Trinidad.
It was an amazing thing to see.
This is where they come back to lay their eggs and then they go out to sea, and we don’t see him again for several years.
An amazing, amazing thing.
So, thanks to all the folks in Trinidad.
Had a great couple of seminars down there, and thanks to you for stopping by.
We'll see you next time for another netcast from MrExcel.
 

Forum statistics

Threads
1,224,875
Messages
6,181,516
Members
453,050
Latest member
Obil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top