Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba programming
Hi I have 2 questions which I can't figure out.
1. when creating a combo box in excel using visual basics userform1, how do I enter the item of the item selected into an active cell. Ie. if I select cell b5 and then from the combo list I click on "sal" I want "sal" to appear in cell "b5" Also from the userform1 I want a picture to appear in the image1 depending on what I highlight or click from my combo box. Thanks in advance If you reply direct please send to Sal |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba programming
Private Sub Combobox1_Click()
ActiveCell.Value = Combobox1.Value Select Case Combobox1.Value Case "Item1" image1.picture = LoadPicture("C:\My Pictures\myface.jpg") Case "Item2" image1.picture = LoadPicture("C:\My Pictures\myneck.jpg") Case Else image1.picture = LoadPicture("C:\My Pictures\myfinger.jpg") End Select End Sub -- Regards, Tom Ogilvy "sal" wrote in message om... Hi I have 2 questions which I can't figure out. 1. when creating a combo box in excel using visual basics userform1, how do I enter the item of the item selected into an active cell. Ie. if I select cell b5 and then from the combo list I click on "sal" I want "sal" to appear in cell "b5" Also from the userform1 I want a picture to appear in the image1 depending on what I highlight or click from my combo box. Thanks in advance If you reply direct please send to Sal |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
programming help | Excel Discussion (Misc queries) | |||
CD Programming | Excel Discussion (Misc queries) | |||
programming | Excel Discussion (Misc queries) | |||
Programming help | Excel Discussion (Misc queries) | |||
How to add via programming ? | Excel Programming |