• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Display image on the base of cell value in the validation list

ThrottleWorks

Excel Ninja
I have 150 pictures in 150 different sheets.

I have named the range surrounding picture area.


For example, each picture fits between range (“A1:L27”).

I have named this range with product name, the picture in the sheet is the product.


I have an index sheet.

In this sheet, I have a cell with validation list.

The list consists of all the 150 product names.


In the index sheet itself I have an image control (developer, insert, ActiveX controls).


If the user select product abc from the product list, the image of abc should be reflected in the image control below.


I have done this before, but could not do it today, both formula or vba is fine.

I have done this earlier with formula, but can not remember now.


I know how to manually assign range name to the image control, but I want to work auto.

The purpose is, the user will select product name from the list & image will be displayed below.


Can anyone please help me in this.
 
Just because you appreciated my username... don't know give it out a try...


https://docs.google.com/file/d/0B0kxdNrvyzqzVzRxQ3VaUDg2aEk/edit?usp=sharing
 
Hi Sachin..


I think.. below URL is excluded from your "Office Router ACL".. :)


http://www.get-digital-help.com/2013/03/08/change-picture-vba/


Check if you can manage this according to your requirement..


Regards,

Deb
 
Hi I am using the code given in the link.


http://www.get-digital-help.com/2013/03/08/change-picture-vba/


PFB the code

[pre]
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$2" Then
On error resume next
Shapes(1).Delete
On error goto 0
Pictures.Insert(ActiveSheet.Range("C6").Value).Select
With Selection
.Height = 120.24
.Width = 180
.Left = 96.75
.Top = 90
End With
Range("C3").Select
End If
End Sub
[/pre]

I have changed the target address to D4.

D4 is the list of product names.


I have gif images, so I have done the changes in my formula accordingly.


The problem is, I do not see any image populating, the macro does not run.


The hyperlink created in the data sheet is perfect, if i click this manually it opens the image.


I am not sure why this macro is not working, can anyone please help me in this.
 
Hi, sachinbizboy!

Any chance of uploading a sample file? So as to not have to build a test scenario. Today I'm lazier than usual.

Regards!
 
Hi SirJB7, extreamally sorry for late, reply, got stuck with another problem from last 2 days.


We are not allowed to upoad anything, thanks for your help, have a nice day.
 
Hi Sachin..


Without sample file.. its hard to guess..


* can you please check C6.. which is color as White and approx invisible.. in the sample file of OSCAR..

* Is GIF images are really GIF.. which changes and like collection of images.. Open in any browser.. check if they are running image.. EXCEL will not able to display running image (I think..).. it will only show the first frame of the image.. (which may be BLANK / White)..


Regards,

Deb
 
Hi, sachinbizboy!


Regarding this post from Debraj Roy:

http://chandoo.org/forums/topic/display-image-on-the-base-of-cell-value-in-the-validation-list#post-102443

I think I've done something alike in:

http://chandoo.org/forums/topic/insert-photos-in-excel-upon-name-change-in-a-cell


Does it help?


Regards!
 
Hi SirJB7 & Debraj, extreamally sorry for late reply.


@ SirJB7 I am checking the link provided by, the link is not accessible in the office.


I will do it home, I will resume my work on this today again, will share the results.


Thanks a lot for the help & your valuable time, have a nice day.
 
Back
Top