Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I would like to prevent the list showing in a combobox if a condition is not met in another control elsewhere on a userform. It is not possible to use the other control's Exit event and Cancel = True and I cannot disable or lock the combobox as it's DropButtonClick event would not be fired. If ComboBox1.DropDown can reveal the list then: ComboBox1.DropDown = False has no effect. What should the syntax be to prevent DropDown? Appreciate any ideas. T.I.A. Geoff |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Geoff,
Perhaps disable the Combobox (Enabled=False) while your condition exists? "Geoff" wrote: Hi I would like to prevent the list showing in a combobox if a condition is not met in another control elsewhere on a userform. It is not possible to use the other control's Exit event and Cancel = True and I cannot disable or lock the combobox as it's DropButtonClick event would not be fired. If ComboBox1.DropDown can reveal the list then: ComboBox1.DropDown = False has no effect. What should the syntax be to prevent DropDown? Appreciate any ideas. T.I.A. Geoff |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Toppers
Thanks for the reply, I have found a way. Right or wrong it seems to work. In further testing I found that if I returned the focus to the 'conditional ' control from the cbobox in an cbobox_enter event like so, it prevents the list showing. Private Sub cbo1_Enter() If opt1.Value = False And opt2.Value = False Then fraop1opt2.SetFocus Exit Sub End If 'rest of code End Sub Geoff "Toppers" wrote: Geoff, Perhaps disable the Combobox (Enabled=False) while your condition exists? "Geoff" wrote: Hi I would like to prevent the list showing in a combobox if a condition is not met in another control elsewhere on a userform. It is not possible to use the other control's Exit event and Cancel = True and I cannot disable or lock the combobox as it's DropButtonClick event would not be fired. If ComboBox1.DropDown can reveal the list then: ComboBox1.DropDown = False has no effect. What should the syntax be to prevent DropDown? Appreciate any ideas. T.I.A. Geoff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select From dropdown and return another dropdown menu | Excel Discussion (Misc queries) | |||
Rephrased Question on Random Items within Worksheet (3/3/10) | Excel Worksheet Functions | |||
formula problem rephrased | Excel Worksheet Functions | |||
Rephrased - Remove blank cells - no sorting, copy or pasting | Excel Worksheet Functions | |||
SUM REPHRASED | New Users to Excel |