Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Select a picture according to a selection on a dropdown box

Hello,

I have made three pictures out of autoshapes on one sheet (this will be
hidden from the user). I would like to have another sheet where one of these
pictures is displayed according to a selection in a dropdown box. So, if the
user selects Group 1, I would like picture 1 to be displayed. If they select
Group 2, I would like picture 2 to be displayed instead and so on. Is this
do-able? I am not very confident with VB but have recorded some macros in the
past.

Thanks a lot for your help in advance.

--
Johanna G
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Select a picture according to a selection on a dropdown box

In it's simplest form here is some code that should get you started. It
detects changes in cell A1 and grabs shapes from sheet1 an dpastes them onto
the sheet with the code in it. This code must go inside the sheet. Right
click the sheet tab and select view code. Paste the following...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Select Case Target.Value
Case "Round"
On Error Resume Next
Me.Shapes(1).Delete
On Error GoTo 0
Sheet1.Shapes("Oval 2").Copy 'Shape named oval 2 on sheet1
Me.Paste

Case "Square"
On Error Resume Next
Me.Shapes(1).Delete
On Error GoTo 0
Sheet1.Shapes("Rectangle 1").Copy 'Shape named rectangle 1
Me.Paste
End Select
End If
End Sub

--
HTH...

Jim Thomlinson


"Johanna Gronlund" wrote:

Hello,

I have made three pictures out of autoshapes on one sheet (this will be
hidden from the user). I would like to have another sheet where one of these
pictures is displayed according to a selection in a dropdown box. So, if the
user selects Group 1, I would like picture 1 to be displayed. If they select
Group 2, I would like picture 2 to be displayed instead and so on. Is this
do-able? I am not very confident with VB but have recorded some macros in the
past.

Thanks a lot for your help in advance.

--
Johanna G

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Select a picture according to a selection on a dropdown box

To have a picture show up based on VLOOKUP when you select an item from a DV
list or type in a name see JE MCGimpsey's site.

http://www.mcgimpsey.com/excel/lookuppics.html

As written John's code allows for only one picture to be displayed and the
pictures must be stored on the same worksheet as the VLOOKUP formula.

But that will pose no problem...........simply cut and paste the shapes to
the sheet in which you want them to be displayed.

Or you need multiple pictures shown from VLOOKUPS.............

Got to Debra Dalgeish's site for a sample workbook from Bernie Dietrick for
adding pictures via selections.

Allows for more than one picture to be displayed on a sheet but also
requires the pictures be stored on same sheet.

http://www.contextures.on.ca/excelfiles.html#DataVal

DV0049 - ClipArt Selection


Gord Dibben MS Excel MVP

On Fri, 29 Jan 2010 06:21:01 -0800, Johanna Gronlund
wrote:

Hello,

I have made three pictures out of autoshapes on one sheet (this will be
hidden from the user). I would like to have another sheet where one of these
pictures is displayed according to a selection in a dropdown box. So, if the
user selects Group 1, I would like picture 1 to be displayed. If they select
Group 2, I would like picture 2 to be displayed instead and so on. Is this
do-able? I am not very confident with VB but have recorded some macros in the
past.

Thanks a lot for your help in advance.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Select a picture according to a selection on a dropdown box

Check this add in for Excel...can do it in another way.

http://www.excel-image-assistant.com
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dropdown selection by keyboard Erol Excel Worksheet Functions 1 February 11th 09 02:21 PM
Dropdown selection by keyboard Erol Excel Worksheet Functions 2 February 10th 09 09:19 PM
How do I allow a multiple selection from a dropdown? Monica Excel Discussion (Misc queries) 11 April 17th 08 04:34 PM
Insert Picture from dropdown selection Mike at Channel New Users to Excel 21 March 22nd 06 01:14 AM
Dropdown list key selection TrevorM Excel Discussion (Misc queries) 1 October 3rd 05 07:57 PM


All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"