Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default ComboBox and text Box


I have a combobox that has two values

Value 1 = Orange
Value 2 = Pink

If I choose Orange I want to get Cell B1 in the text box and if I
choose Pink I want to get cell B2 in the same text box. Only one choice
the user will have to pick. please help

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default ComboBox and text Box

Private Sub ComboBox1_Change()
Select Case ComboBox1.ListIndex
Case Is = 0 'orange
TextBox1.Value = Sheets("Sheet1").Range("B1")
Case Is = 1 ' pink
TextBox1.Value = Sheets("Sheet1").Range("B2")
Case Else
TextBox1.Value = ""
End Select
End Sub

--
Cheers
Nigel



wrote in message
ps.com...

I have a combobox that has two values

Value 1 = Orange
Value 2 = Pink

If I choose Orange I want to get Cell B1 in the text box and if I
choose Pink I want to get cell B2 in the same text box. Only one choice
the user will have to pick. please help



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
VBA ComboBox Text Color jlclyde Excel Discussion (Misc queries) 3 October 9th 09 04:26 PM
combobox text size CraigSA Excel Discussion (Misc queries) 0 May 18th 06 02:46 PM
Formating Text in a combobox Leith Ross[_9_] Excel Programming 0 March 16th 05 01:15 PM
ComboBox - Entering Text Richard Buttrey[_5_] Excel Programming 3 August 26th 04 05:24 PM
Help!!-combobox with Text Rob[_13_] Excel Programming 0 November 25th 03 11:15 AM


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