Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
sal sal is offline
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
programming help Stan Excel Discussion (Misc queries) 2 April 23rd 07 02:44 PM
CD Programming nelson Excel Discussion (Misc queries) 0 June 4th 06 04:32 PM
programming ernie Excel Discussion (Misc queries) 4 March 13th 06 02:06 PM
Programming help BB Excel Discussion (Misc queries) 3 December 5th 05 01:09 AM
How to add via programming ? Milind Excel Programming 3 September 10th 03 11:57 PM


All times are GMT +1. The time now is 09:18 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"