Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Combo Box List Question

I have a list of 8 things on a sheet that I have named OrionMakeCodes
they are as follows:
(N)one
(G)M
(C)rysler
(F)ord
(T)ruck
(E)uropean
(A)sian
(X)ception

I am listing these in a combo box by setting the row source to
OrionMakeCodes which populates my Combo box

When I pick a value from this Combo box, instead of setting a value of
what you see in the list, I want it to just set the Letter in
Parenthesis on another sheet which is:
Set wo = Worksheets("cpToOrionMakeCodes")

So my basic question is how do I list one set of values in a combo box
and pass another value based on the choice?

I know this has to be a really simple thing to do but I'm new to VBA
and I'm having trouble figuring it out.

Thanks Jody

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Combo Box List Question

There are a couple of ways you can do it, but one way is to use the click
event. (don't link the combobox to any cells unless you want the text
selected entered somewhere else as well).

Private Sub Combobox1_Click()
Dim wo as worksheet
Dim s as String, s1 as String
if Combobox1.ListIndex < -1 then
s = Combobox1.Value
s1 = Mid(s,2,1)
Set wo = Worksheets("cpToOrionMakeCodes")
wo.Range("B9").Value = s1
End If
End Sub

--
Regards,
Tom Ogilvy

"ssjody" wrote in message
oups.com...
I have a list of 8 things on a sheet that I have named OrionMakeCodes
they are as follows:
(N)one
(G)M
(C)rysler
(F)ord
(T)ruck
(E)uropean
(A)sian
(X)ception

I am listing these in a combo box by setting the row source to
OrionMakeCodes which populates my Combo box

When I pick a value from this Combo box, instead of setting a value of
what you see in the list, I want it to just set the Letter in
Parenthesis on another sheet which is:
Set wo = Worksheets("cpToOrionMakeCodes")

So my basic question is how do I list one set of values in a combo box
and pass another value based on the choice?

I know this has to be a really simple thing to do but I'm new to VBA
and I'm having trouble figuring it out.

Thanks Jody



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Combo Box List Question

Worked Perfectly! Thanks

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
List or Combo Box Question dhstein Excel Discussion (Misc queries) 1 June 14th 09 06:30 AM
eXceL 2003 - list or combo box question David Gerstman Excel Discussion (Misc queries) 2 May 23rd 05 03:58 PM
Combo box list question tanner g Excel Discussion (Misc queries) 1 April 21st 05 08:59 AM
Combo box question Frepez Excel Worksheet Functions 4 March 24th 05 07:08 PM
Combo Box Question Scott Jacobs Excel Worksheet Functions 0 November 23rd 04 01:40 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"