Home |
Search |
Today's Posts |
#1
|
|||
|
|||
use pull down menu to select a picture
I use the Combo Box pull down menu buttons a lot.
I click on the Box, select an item from the list and the relevant data pops up as expected. How can I make a picture pop up when I select an item from the Combo Box List? please advise |
#2
|
|||
|
|||
I think you would need VBA.The picture would not be in the cell, as shapes
exist in a separate layer to the worksheet cells, but you could position it. What you could do is name the logo by the value in the drop-down, and then move that to the required position, move all others away. The problem is that when you select something, you need a way to align that selection to the picture object. That is what I was suggesting was a method of aligning them. What I mean is that if the entry in the drop-down is say 'Mercury Inc' then name the picture with that same value. But you still don't get it move automatically, you need to write some code to do that. This worksheet event code will do it assuming that the drop-down is DataValidation Private Sub Worksheet_Change(ByVal Target As Range) Dim sh As Shape Application.EnableEvents = False On Error GoTo ws_exit If Not Intersect(Target, Range("A13")) Is Nothing Then With Target If .Value < "" Then For Each sh In ActiveSheet.Shapes sh.Left = 5000 Next sh With ActiveSheet.Shapes(.Value) .Left = 100 .Top = 100 End With End If End With End If ws_exit: Application.EnableEvents = True End Sub On the worksheet that you want the pictures, right-click on the sheet tab. This will bring up a menu, select View Code from the menu, and this will open up the VBA with the worksheet code module opened up. Paste that code into there. If you drop-down is not in A13, change that part of the code to suit. Go back to Excel, load your pictures into the sheet, load the drop-down list, then select something. You may then want to tune where the picture moves to. -- HTH Bob Phillips "Skonnoth" wrote in message ... I use the Combo Box pull down menu buttons a lot. I click on the Box, select an item from the list and the relevant data pops up as expected. How can I make a picture pop up when I select an item from the Combo Box List? please advise |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
insert picture | Excel Discussion (Misc queries) | |||
External Data to be used as in a pull down menu in Excel2003 | Excel Discussion (Misc queries) | |||
Dynamic Formulas with Dynamic Ranges | Excel Worksheet Functions | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) | |||
When I select "Open" from the "File" menu in Excel, I get only a . | Excel Discussion (Misc queries) |