View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.newusers
Mike at Channel
 
Posts: n/a
Default Insert Picture from dropdown selection

One More problem,
that solution worked great for one pull down list, but I'm trying to compare
two boats by selection, so I need apply this code to two dropdown lists:

Option Explicit

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B12")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

This code works for my output in cell B12 from the dropdown list in B11. Now
I would like to do the same for my second dropdown list in C11, and would
like to display it in C12. Both dropdown lists are coming from the same list
named picTable on Sheet 2 as informed by your excel help. I can't seem to
just duplicate the code and change the range on the second code. I'm guessing
I have to nest the two codes into one code for that sheet? I don't know how
to properly code this. Any help?

Thanks again,
Mike

"Cutter" wrote:


Have you had a look at JE McGimsey's site:

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

I think it is exactly what you're trying to do.


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=513797