SOLVED

Show image from url while hovering mouse

%3CLINGO-SUB%20id%3D%22lingo-sub-1874574%22%20slang%3D%22en-US%22%3EShow%20image%20from%20url%20while%20hovering%20mouse%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1874574%22%20slang%3D%22en-US%22%3E%3CP%3EHello.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20been%20trying%20to%20do%20this%20for%20days%20and%20it's%20driving%20me%20crazy.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20an%20Excel%20file%20with%20thousands%20of%20URL%20of%20images%20on%20column%20A%20such%20as%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.mywebsite.com%2Fimgs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ewww.mywebsite.com%2Fimages%2F001.png%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.mywebsite.com%2Fimgs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ewww.mywebsite.com%2Fimages%2F002.png%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.mywebsite.com%2Fimgs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ewww.mywebsite.com%2Fimages%2F003.png%3C%2FA%3E%3C%2FP%3E%3CP%3Eand%20I%20would%20like%20it%20that%20the%20thumbnail%20from%20the%20correspondent%20image%20is%20shown%20while%20I%20hover%20the%20mouse%20over%20the%20link%20(or%20even%20while%20hovering%20an%20adjacent%20cell).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20understand%20this%20needs%20some%20VBA%20(which%20is%20all%20new%20to%20me).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20to%20run%20some%20macros%20but%20they%20simply%20add%20pictures%20to%20the%20Excel%20file%20itself%20and%20I%20want%20to%20keep%20the%20file%20as%20light%20as%20possible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20file%20has%20thousands%20of%20references%20and%20I%20don't%20know%20them%20by%20heart.%20I%20managed%20to%20have%20the%20link%20to%20the%20product%20page%20but%20a%20simple%20thumbnail%20of%20the%20item's%20photo%20would%20do%20the%20trick%2C%20instead%20of%20having%20to%20open%20a%20webpage%20in%20the%20browser%20everytime%20I%20want%20to%20confirm%20that%20the%20item%20is%20correct.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20your%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1874574%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1877318%22%20slang%3D%22de-DE%22%3ESubject%3A%20Show%20image%20from%20url%20while%20hovering%20mouse%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1877318%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F864666%22%20target%3D%22_blank%22%3E%40DavidAz81%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EWith%20your%20permission%2C%20if%20I%20may%20add%20a%20thought%20to%20your%20project%2C%20instead%20of%20using%20the%20hyperlink%2C%20insert%20a%20comment.%3C%2FSPAN%3E%3C%2FSPAN%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EHere%20is%20the%20installation%20description%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3ECursor%20in%20cell%20with%20comment%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26gt%3B%20right%20mouse%20button%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26gt%3B%20edit%20comment%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26gt%3B%20right%20mouse%20button%20click%20on%20the%20edge%20of%20the%20comment%20field%20(not%20very%20easy)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26gt%3B%20select%20format%20comment%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26gt%3B%20colors%20and%20lines%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26gt%3B%20drop%20down%20color%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26gt%3B%20fill%20effects%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26gt%3B%20tab%20graphic%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26gt%3B%20select%20graphic%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EIs%20just%20a%20thought%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EOr%20here%20a%20VBA%20approach%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%223%22%3E%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F43923102%2Fhover-preview-over-excel-image-link%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHover%20preview%20over%20excel%20image%20link%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20I%20was%20able%20to%20help%20you.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1878364%22%20slang%3D%22en-US%22%3EBetreff%3A%20Show%20image%20from%20url%20while%20hovering%20mouse%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1878364%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40Nikolino%3C%2FA%3E%26nbsp%3BThanks%20for%20your%20reply.%20Of%20course%20I'm%20willing%20to%20accept%20any%20suggestions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20already%20saw%20that%20option%20(to%20add%20a%20picture%20in%20the%20comments)%20and%20it%20could%20work%20but%20I%20didn't%20find%20the%20way%20to%20do%20it%20automatically%20nor%20with%20images%20that%20are%20stored%20online%20(not%20on%20my%20hard%20drive).%20If%20you%20know%20how%20please%20let%20me%20know.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegarding%20the%20second%20option%2C%20that%20is%20exactly%20what%20I'm%20trying%20to%20accomplish.%20I%20checked%20that%20yesterday%20and%20tried%20to%20run%20it%26nbsp%3B%20but%20I%20kept%20getting%20errors.%20Again%2C%20I'm%20new%20to%20this%20and%20I%20must%20be%20doing%20something%20wrong.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20start%20with%20my%20Office%20is%20not%20in%20english%20and%20I%20can't%20get%20a%20way%20to%20start%20with%20this%20text%3A%3C%2FP%3E%3CP%3E%3DHYPERLINK(OnMouseOver(%22%3CA%20href%3D%22http%3A%2F%2Fi.imgur.com%2FrQ5G8sZ.jpg%26quot%3B)%2C%26quot%3Bhttp%3A%2F%2Fi.imgur.com%2FrQ5G8sZ.jpg%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Fi.imgur.com%2FrQ5G8sZ.jpg%22)%2C%22http%3A%2F%2Fi.imgur.com%2FrQ5G8sZ.jpg%3C%2FA%3E%22)%3C%2FP%3E%3CP%3Eand%20I%20always%20get%20a%20%23NAME%3F%20error.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20it's%20because%20of%20the%20OnMouseOver%20function%20that%20I%20cannot%20translate%20to%20spanish.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20happen%20to%20have%20a%20xlsm%20file%20with%20that%20macro%20applied%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello.

 

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:

www.mywebsite.com/images/001.png

www.mywebsite.com/images/002.png

www.mywebsite.com/images/003.png

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.

 

Cheers!!

5 Replies

@DavidAz81 

 

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.

 

Nikolino

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:

=HYPERLINK(OnMouseOver("http://i.imgur.com/rQ5G8sZ.jpg"),"http://i.imgur.com/rQ5G8sZ.jpg")

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.

 

@DavidAz81 

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

 

 

Thank you for your understanding and patience

 

 

Nikolino

I know I don't know anything (Socrates)

best response confirmed by DavidAz81 (New Contributor)
Solution

@DavidAz81  I believe I had the same issue using the code found at https://stackoverflow.com/questions/43923102/hover-preview-over-excel-image-link .  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("http://i.imgur.com/rQ5G8sZ.jpg"),"http://i.imgur.com/rQ5G8sZ.jpg")" but it should be changed to =HYPERLINK(OnMouseOver("http://i.imgur.com/rQ5G8sZ.jpg";A1); "http://i.imgur.com/rQ5G8sZ.jpg"

 

Any way, i did use it like this.   On A column i have the list of hyperlinks (in text such as https://sitename.com/filename.jpg) (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.
Cheers!