Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox limit to list
I'd like to limit limit the choices in an Excel combobox to the tw items in the list. I can specify exact match, but users can still enter text and get a error. What I'd like would be the equivalent to the limit to lis proprty in Access. I'll settle for some sort of error handler. I think it was error 380. When I try to put an error handler on the before or after updat property nothing happes. I notice that the error message is labeled form so maybe it is a for error, but, I don't see a form error event. Thanks for any hel -- tmor ----------------------------------------------------------------------- tmort's Profile: http://www.excelforum.com/member.php...fo&userid=2105 View this thread: http://www.excelforum.com/showthread.php?threadid=38999 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox limit to list
Combobox.Style = fmStyleDropDownList
from help on the style property for fmStyleDropDownList (2) The ComboBox behaves as a list box. The user must choose a value from the list. -- Regards, Tom Ogilvy "tmort" wrote in message ... I'd like to limit limit the choices in an Excel combobox to the two items in the list. I can specify exact match, but users can still enter text and get an error. What I'd like would be the equivalent to the limit to list proprty in Access. I'll settle for some sort of error handler. I think it was error 380. When I try to put an error handler on the before or after update property nothing happes. I notice that the error message is labeled form so maybe it is a form error, but, I don't see a form error event. Thanks for any help -- tmort ------------------------------------------------------------------------ tmort's Profile: http://www.excelforum.com/member.php...o&userid=21053 View this thread: http://www.excelforum.com/showthread...hreadid=389992 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox limit to list
You could add a check in your code that looks at the
combobox.value and checks to see if it is in the list. If combobox1.value = 1 or combobox1.value = 2 then ' continue code Else Msgbox "You did not make an acceptable selection. Please try again" ' code to restart the procedure End If -- steveB Remove "AYN" from email to respond "tmort" wrote in message ... I'd like to limit limit the choices in an Excel combobox to the two items in the list. I can specify exact match, but users can still enter text and get an error. What I'd like would be the equivalent to the limit to list proprty in Access. I'll settle for some sort of error handler. I think it was error 380. When I try to put an error handler on the before or after update property nothing happes. I notice that the error message is labeled form so maybe it is a form error, but, I don't see a form error event. Thanks for any help -- tmort ------------------------------------------------------------------------ tmort's Profile: http://www.excelforum.com/member.php...o&userid=21053 View this thread: http://www.excelforum.com/showthread...hreadid=389992 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox limit to list
Go to the properties of your combobox (right click and clic "properties") and change the "Style" to "2 - fmStyleDropDownList -- TommySzalapsk ----------------------------------------------------------------------- TommySzalapski's Profile: http://www.excelforum.com/member.php...fo&userid=2556 View this thread: http://www.excelforum.com/showthread.php?threadid=38999 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox limit to list
Thanks, Stype 2 works fine for my purposes but I'm glad to learn of the othe check value method to -- tmor ----------------------------------------------------------------------- tmort's Profile: http://www.excelforum.com/member.php...fo&userid=2105 View this thread: http://www.excelforum.com/showthread.php?threadid=38999 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
.AddItem list and populating combobox with created list | Excel Discussion (Misc queries) | |||
item limit for a combobox? | Excel Worksheet Functions | |||
Drop down list limit to list | Excel Discussion (Misc queries) | |||
adding items to combobox using "Tag" control to limit | Excel Programming | |||
ComboBox List | Excel Programming |