Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Numeric Value of Choice in Combobox

Once an item is chosen from a combobox, how do I determine the corresponding
numeric value of that choice?

I need that value in order to pull in another value from the spreadsheet.

Thanks,
Les
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Numeric Value of Choice in Combobox


"WLMPilot" skrev i en meddelelse
...
Once an item is chosen from a combobox, how do I determine the
corresponding
numeric value of that choice?

I need that value in order to pull in another value from the spreadsheet.

Thanks,
Les


Hi Les

Private Sub ComboBox1_Change()
choice = Me.ComboBox1.ListIndex
End Sub

Just remember that first item will be equal to index = 0

Regards,

Per


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Numeric Value of Choice in Combobox

Thanks! One more quick question. Do the textboxes, comboboxes, etc have to
be DIM or is it automatic?

Thanks,
Les


"Per Jessen" wrote:


"WLMPilot" skrev i en meddelelse
...
Once an item is chosen from a combobox, how do I determine the
corresponding
numeric value of that choice?

I need that value in order to pull in another value from the spreadsheet.

Thanks,
Les


Hi Les

Private Sub ComboBox1_Change()
choice = Me.ComboBox1.ListIndex
End Sub

Just remember that first item will be equal to index = 0

Regards,

Per



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
Create a RowSource Depending on ComboBox Choice Blobbies Excel Discussion (Misc queries) 3 November 18th 07 01:22 AM
Numeric in Text to convert back to the form of Numeric for VLookup Purposes achilles Excel Discussion (Misc queries) 4 February 6th 06 07:05 AM
Match Single Numeric Criteria and Return Multiple Numeric Labels Sam via OfficeKB.com Excel Worksheet Functions 3 December 30th 05 08:01 PM
Match Single Numeric Criteria and Return Multiple Numeric Labels Sam via OfficeKB.com Excel Worksheet Functions 0 December 29th 05 08:44 PM
combobox loses first choice Dave Excel Programming 1 October 20th 04 06:15 PM


All times are GMT +1. The time now is 01:27 AM.

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"