Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select Case from Text Box Input
I would like to take the text from a text box in a userform and mak that the criteria for a select case. I have tried the code Cases = frmTestSel.txtSpec.Value 'I've also trie frmTestSel.txtSpec.Text Select Case IDNum Case Cases 'Insert commands here End Select The code only works when the text box contains a single value. I hav also tried using an Input Box instead of a Text Box on a form; th results are the same--the case is never executed unless the bo contains a single value only. To be more detailed, I have 130+ "datasets". All the datasets ar identified by an ID Number (IDNum). The code performs variou operations on chosen datasets. I would like to be able to choos datasets base on the ID Number, so that the user could compare dataset 1, 5, 13 and 120 for example. I know I could do this with a List Box but I have 130+ choices, to this is a very non-ideal solution. An other suggestions -- mackerm ----------------------------------------------------------------------- mackerma's Profile: http://www.excelforum.com/member.php...fo&userid=1534 View this thread: http://www.excelforum.com/showthread.php?threadid=26969 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
Changing multiple cell text from lower case to upper case | Excel Discussion (Misc queries) | |||
Change the text from lower case to upper case in an Excel work boo | Excel Discussion (Misc queries) | |||
How do I change existing text from lower case to upper case | Excel Discussion (Misc queries) | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |