Show image from url while hovering mouse

Copper Contributor



I've been trying to do this for days and it's driving me crazy.


I have an Excel file with thousands of URL of images on column A such as:

and I would like it that the thumbnail from the correspondent image is shown while I hover the mouse over the link (or even while hovering an adjacent cell).


I understand this needs some VBA (which is all new to me).


I've tried to run some macros but they simply add pictures to the Excel file itself and I want to keep the file as light as possible.


The file has thousands of references and I don't know them by heart. I managed to have the link to the product page but a simple thumbnail of the item's photo would do the trick, instead of having to open a webpage in the browser everytime I want to confirm that the item is correct.


Thanks in advance for your help.



5 Replies



With your permission, if I may add a thought to your project, instead of using the hyperlink, insert a comment.

Here is the installation description:

Cursor in cell with comment

> right mouse button

> edit comment

> right mouse button click on the edge of the comment field (not very easy)

> select format comment

> colors and lines

> drop down color

> fill effects

> tab graphic

> select graphic


Is just a thought :)


Or here a VBA approach:

Hover preview over excel image link



Hope I was able to help you.



I know I don't know anything (Socrates)


* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here

@NikolinoDE Thanks for your reply. Of course I'm willing to accept any suggestions.


I already saw that option (to add a picture in the comments) and it could work but I didn't find the way to do it automatically nor with images that are stored online (not on my hard drive). If you know how please let me know.


Regarding the second option, that is exactly what I'm trying to accomplish. I checked that yesterday and tried to run it  but I kept getting errors. Again, I'm new to this and I must be doing something wrong.


To start with my Office is not in english and I can't get a way to start with this text:


and I always get a #NAME? error. 

I think it's because of the OnMouseOver function that I cannot translate to spanish.


Do you happen to have a xlsm file with that macro applied?


Thanks again.



* Knowing the Excel version and operating system would also be an advantage.



Thank you for your understanding and patience




I know I don't know anything (Socrates)

best response confirmed by DavidAz81 (Copper Contributor)

@DavidAz81  I believe I had the same issue using the code found at .  I had the same problem until a saw a comment when they explained the updated reference.    The solution is simple.  first use the hyperlink function in your language, but more than this, you need to correct the cell code. in the original post it was   "=HYPERLINK(OnMouseOver(""),"")" but it should be changed to =HYPERLINK(OnMouseOver("";A1); ""


Any way, i did use it like this.   On A column i have the list of hyperlinks (in text such as (A2 is the first image),  on B column I use this formula (on B2)  I have =HYPERLINK(OnMouseOver(A2;B2);A2)   on C column the =HYPERLINK(Reset()) .


in this sample I used the same image link on all cells (lazy me) but it works.  .    anyway, it is not the best solution yet. I am working on other easier way.   this is a screenshot of the sample.


samplemousover2.pngHope it helps someone.. .  the real advantage in this one is that you do not save all pictures in the excel file,  as you say, if your list is large it would not be practical, but I think there must be a better way.   i have included the sample file, but in case you don't want to download a unknown file, just follow the instructions.


Thanks Eduardo.
I just restarted working on this project and it was very helpful.
I can't use that it my existing file because of the macro but I will find a workaround.
Thanks again for your explanation and for the file.