Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Can I show a picture depending on what data is selected in a cell

I would like to show a jpeg picture representing the data that is selected
from a dropdown list. If the value changes, I would like the picture to
change.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can I show a picture depending on what data is selected in a cell

Maybe you could do something like JE McGimpsey does at:
http://www.mcgimpsey.com/excel/lookuppics.html

Lesley Murray wrote:

I would like to show a jpeg picture representing the data that is selected
from a dropdown list. If the value changes, I would like the picture to
change.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Can I show a picture depending on what data is selected in a cell

Create yourself a Userform, named Userform1 and in the code window behind the
Userform paste in:

Private Sub ComboBox1_Change()
Image1.Picture = LoadPicture("C:\CLIPART\PHOTOS\OFFICE\" & ComboBox1.Value &
".jpg") ' <<change to suit !!
End Sub

Private Sub UserForm_Initialize()
Dim i As Long
Dim Vlist As Variant
Vlist = Array("Computer", "Coffee", "Keyboard") 'Change to the Actual
Filename
For i = LBound(Vlist) To UBound(Vlist)
ComboBox1.AddItem Vlist(i)
Next i
End Sub

Also create (Using the Control Toolbox type) a combobox on the Userform,
named combobox1;


That should get you started...

Jim



"Lesley Murray" wrote:

I would like to show a jpeg picture representing the data that is selected
from a dropdown list. If the value changes, I would like the picture to
change.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Can I show a picture depending on what data is selected in a c

You will also have to add an Image Control to your Userform, and in the
properties window of the Image control change the Property "PictureSizeMode"
to #2 selection.


"JMay" wrote:

Create yourself a Userform, named Userform1 and in the code window behind the
Userform paste in:

Private Sub ComboBox1_Change()
Image1.Picture = LoadPicture("C:\CLIPART\PHOTOS\OFFICE\" & ComboBox1.Value &
".jpg") ' <<change to suit !!
End Sub

Private Sub UserForm_Initialize()
Dim i As Long
Dim Vlist As Variant
Vlist = Array("Computer", "Coffee", "Keyboard") 'Change to the Actual
Filename
For i = LBound(Vlist) To UBound(Vlist)
ComboBox1.AddItem Vlist(i)
Next i
End Sub

Also create (Using the Control Toolbox type) a combobox on the Userform,
named combobox1;


That should get you started...

Jim



"Lesley Murray" wrote:

I would like to show a jpeg picture representing the data that is selected
from a dropdown list. If the value changes, I would like the picture to
change.

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
Show gridlines or cell borders on top of a picture sukey51 Excel Discussion (Misc queries) 0 March 24th 07 04:55 AM
Copying data depending on cell value ivory_kitten Excel Worksheet Functions 0 August 31st 06 04:54 AM
Is there a formula to show which cell is currently selected Chris Excel Worksheet Functions 4 May 8th 06 03:33 PM
return a data list depending on a value selected within a drop dow loren Excel Discussion (Misc queries) 1 April 11th 05 05:17 PM
how do I show a picture in excel based on cell data Wishing to Excel Excel Discussion (Misc queries) 2 January 10th 05 04:39 PM


All times are GMT +1. The time now is 01:45 PM.

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"