Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Properties of Combo Box in Userform

Hi,

I'm using a combo box in a userform and using "Add Data" in the VBA code to
populate the drop down options...so far so good. However I'm having
difficulty selecting the correct properites of the combo box, to prevent the
(human) user from selecting & editing the options in the drop down, when the
userform appears. Everything I try prevents the dropdown from actually,
well..dropping down.

Also, is it possible to disable or make invisible a button on a worksheet
when a condition arises (say a cell changes to a preset value). I can make
the button "grey out" or disappear on a UserForm, but I can't see how to do
it if it's on a worksheet. OK, I could set a condition in the code for it not
operate if pushed, but "greying out" would be neater.

Thanks...Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Properties of Combo Box in Userform

If you set the Style property of the combobox to
2-fmStyleDropDownList, the user can only select items from the
dropdown list; the user cannot enter other data in the combobox.

To "grey out" a button, set the Enabled property to False.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Chris Gorham" wrote in
message
...
Hi,

I'm using a combo box in a userform and using "Add Data" in the
VBA code to
populate the drop down options...so far so good. However I'm
having
difficulty selecting the correct properites of the combo box,
to prevent the
(human) user from selecting & editing the options in the drop
down, when the
userform appears. Everything I try prevents the dropdown from
actually,
well..dropping down.

Also, is it possible to disable or make invisible a button on a
worksheet
when a condition arises (say a cell changes to a preset value).
I can make
the button "grey out" or disappear on a UserForm, but I can't
see how to do
it if it's on a worksheet. OK, I could set a condition in the
code for it not
operate if pushed, but "greying out" would be neater.

Thanks...Chris



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Properties of Combo Box in Userform

Thanks Chip on the first point...but not sure how to set the Enabled property
on a button that resides on a worksheet...can do this no probs if its on the
Userform

Chris

"Chip Pearson" wrote:

If you set the Style property of the combobox to
2-fmStyleDropDownList, the user can only select items from the
dropdown list; the user cannot enter other data in the combobox.

To "grey out" a button, set the Enabled property to False.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Chris Gorham" wrote in
message
...
Hi,

I'm using a combo box in a userform and using "Add Data" in the
VBA code to
populate the drop down options...so far so good. However I'm
having
difficulty selecting the correct properites of the combo box,
to prevent the
(human) user from selecting & editing the options in the drop
down, when the
userform appears. Everything I try prevents the dropdown from
actually,
well..dropping down.

Also, is it possible to disable or make invisible a button on a
worksheet
when a condition arises (say a cell changes to a preset value).
I can make
the button "grey out" or disappear on a UserForm, but I can't
see how to do
it if it's on a worksheet. OK, I could set a condition in the
code for it not
operate if pushed, but "greying out" would be neater.

Thanks...Chris




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Properties of Combo Box in Userform

If you are using the command button from the Controls toolbox, it
has an Enabled property that you can set from code:

Sheet1.CommandButton1.Enabled = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Chris Gorham" wrote in
message
...
Thanks Chip on the first point...but not sure how to set the
Enabled property
on a button that resides on a worksheet...can do this no probs
if its on the
Userform

Chris

"Chip Pearson" wrote:

If you set the Style property of the combobox to
2-fmStyleDropDownList, the user can only select items from the
dropdown list; the user cannot enter other data in the
combobox.

To "grey out" a button, set the Enabled property to False.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Chris Gorham" wrote
in
message
...
Hi,

I'm using a combo box in a userform and using "Add Data" in
the
VBA code to
populate the drop down options...so far so good. However I'm
having
difficulty selecting the correct properites of the combo
box,
to prevent the
(human) user from selecting & editing the options in the
drop
down, when the
userform appears. Everything I try prevents the dropdown
from
actually,
well..dropping down.

Also, is it possible to disable or make invisible a button
on a
worksheet
when a condition arises (say a cell changes to a preset
value).
I can make
the button "grey out" or disappear on a UserForm, but I
can't
see how to do
it if it's on a worksheet. OK, I could set a condition in
the
code for it not
operate if pushed, but "greying out" would be neater.

Thanks...Chris






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
Editing combo-box properties Inquiringmind Excel Discussion (Misc queries) 4 October 30th 07 04:07 AM
Can't find the properties in a Combo Box tbmarlie Excel Discussion (Misc queries) 2 August 27th 07 07:34 PM
Combo Box Properties Squeaky Excel Discussion (Misc queries) 0 December 20th 06 03:44 PM
Combo Box properties problem Simon205 Excel Worksheet Functions 2 May 23rd 06 10:13 AM
Combo Box Properties Aex de Silva Excel Worksheet Functions 1 December 28th 05 10:38 PM


All times are GMT +1. The time now is 09:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"