Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Is it possible in a combox to disable one item so the user see the item but does not can select the item?? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Peter
Out of interest, why do you want to do this? I don't know of a way of doing this exactly but you could check the chosen value and reject it if it's the wrong one. For example, assume combobox1 has three values "Tom", "Dick", "Harry" and that you don't want the user to be able to choose "Dick" Private Sub ComboBox1_Change() If (ComboBox1.Value = "Dick") Then MsgBox ("Dick is not a valid selection") ComboBox1.ListIndex = -1 End If End Sub This way the user can choose any value (including Dick) buts gets shown a message when Dick's chosen saying "not valid" and the listindex is set to -1 (i.e. no item chosen) Hope this helps David "Peter Pantus" wrote in message l... Hi, Is it possible in a combox to disable one item so the user see the item but does not can select the item?? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks David
That is exaclty what I want It is too complicate too explane why I want to do this "David Coleman" schreef in bericht ... Hi Peter Out of interest, why do you want to do this? I don't know of a way of doing this exactly but you could check the chosen value and reject it if it's the wrong one. For example, assume combobox1 has three values "Tom", "Dick", "Harry" and that you don't want the user to be able to choose "Dick" Private Sub ComboBox1_Change() If (ComboBox1.Value = "Dick") Then MsgBox ("Dick is not a valid selection") ComboBox1.ListIndex = -1 End If End Sub This way the user can choose any value (including Dick) buts gets shown a message when Dick's chosen saying "not valid" and the listindex is set to -1 (i.e. no item chosen) Hope this helps David "Peter Pantus" wrote in message l... Hi, Is it possible in a combox to disable one item so the user see the item but does not can select the item?? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use match function to add different item in Combobox | Excel Worksheet Functions | |||
Disable and enable dropdown combobox(Form Control) | Excel Discussion (Misc queries) | |||
item limit for a combobox? | Excel Worksheet Functions | |||
Disable an item in a list | Excel Discussion (Misc queries) | |||
ComboBox and select item | Excel Programming |