ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to prevent focus by clicking combo box ? (https://www.excelbanter.com/excel-programming/399750-how-prevent-focus-clicking-combo-box.html)

dennis logan[_2_]

How to prevent focus by clicking combo box ?
 
Hi.

I want to prevent focus when the user clicking combo box so that the user
can't change the list. I have tried to look in excel help, but find nothing.


Thanks
dennis logan


Incidental

How to prevent focus by clicking combo box ?
 
Hi Dennis

Not very clear what you are asking but you can set the enabled value
of the combobox to false this will allow the user to see the value
that is held in there but they are unable to change it also you will
be able to get the value out any time you need using code.

combobox1.enabled=false

hope this is of some use to you

S


dennis logan[_2_]

How to prevent focus by clicking combo box ?
 
If I disable the combo box. the user can't click it to select the list. What
I need is the combo box still active while the user can't change the list. By
the default. it is possible to select and change the list.


"Incidental" wrote:

Hi Dennis

Not very clear what you are asking but you can set the enabled value
of the combobox to false this will allow the user to see the value
that is held in there but they are unable to change it also you will
be able to get the value out any time you need using code.

combobox1.enabled=false

hope this is of some use to you

S



Zone[_3_]

How to prevent focus by clicking combo box ?
 
Try changing the Match Required property to true. James

"dennis logan" wrote in message
...
If I disable the combo box. the user can't click it to select the list.
What
I need is the combo box still active while the user can't change the list.
By
the default. it is possible to select and change the list.


"Incidental" wrote:

Hi Dennis

Not very clear what you are asking but you can set the enabled value
of the combobox to false this will allow the user to see the value
that is held in there but they are unable to change it also you will
be able to get the value out any time you need using code.

combobox1.enabled=false

hope this is of some use to you

S





Incidental

How to prevent focus by clicking combo box ?
 
Hi

do you mean that you don't want the user to be able to add there own
values to the list?? if so you can set the combobox to act as a drop
down list that restricts the user to having to choose one of the
contained values. you can change this in the Style property from the
properties panel, just change the setting to fmStyleDropDownList.

Steve



dennis logan[_2_]

How to prevent focus by clicking combo box ?
 
I have tried to set the Match Required property to true but the focus still
exist, i.e. I can type any character in combo box. Is it possible to block
this focus ??


"Zone" wrote:

Try changing the Match Required property to true. James

"dennis logan" wrote in message
...
If I disable the combo box. the user can't click it to select the list.
What
I need is the combo box still active while the user can't change the list.
By
the default. it is possible to select and change the list.


"Incidental" wrote:

Hi Dennis

Not very clear what you are asking but you can set the enabled value
of the combobox to false this will allow the user to see the value
that is held in there but they are unable to change it also you will
be able to get the value out any time you need using code.

combobox1.enabled=false

hope this is of some use to you

S






dennis logan[_2_]

How to prevent focus by clicking combo box ?
 
It works!! Thanks so much Steve.

"Incidental" wrote:

Hi

do you mean that you don't want the user to be able to add there own
values to the list?? if so you can set the combobox to act as a drop
down list that restricts the user to having to choose one of the
contained values. you can change this in the Style property from the
properties panel, just change the setting to fmStyleDropDownList.

Steve




Zone[_3_]

How to prevent focus by clicking combo box ?
 
Steve's solution was better. James
"dennis logan" wrote in message
...
I have tried to set the Match Required property to true but the focus still
exist, i.e. I can type any character in combo box. Is it possible to block
this focus ??


"Zone" wrote:

Try changing the Match Required property to true. James

"dennis logan" wrote in message
...
If I disable the combo box. the user can't click it to select the list.
What
I need is the combo box still active while the user can't change the
list.
By
the default. it is possible to select and change the list.


"Incidental" wrote:

Hi Dennis

Not very clear what you are asking but you can set the enabled value
of the combobox to false this will allow the user to see the value
that is held in there but they are unable to change it also you will
be able to get the value out any time you need using code.

combobox1.enabled=false

hope this is of some use to you

S









All times are GMT +1. The time now is 11:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com