Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Changing multiple cell text from lower case to upper case Patti Excel Discussion (Misc queries) 2 January 4th 08 08:35 PM
Change the text from lower case to upper case in an Excel work boo dave01968 Excel Discussion (Misc queries) 2 December 9th 05 09:09 AM
How do I change existing text from lower case to upper case CT Cameron Excel Discussion (Misc queries) 2 November 30th 04 01:07 AM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


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