PC Review


Reply
Thread Tools Rate Thread

Disabling the Combo Box

 
 
Souny
Guest
Posts: n/a
 
      9th Oct 2009
Good morning all,

I have a combo box in Sheet1 of my Excel file. What I like to do is to
disable the combo box so that when users click on it, nothing would happen
and selections would not display.

I would like to share a little background related to what I am looking for.
I have a code to perform a list of things on Sheet1 (and combo box is one of
those things). After a list of those things has performed, I want to disable
the combo box so that users can not revisit the combo box to make a selection
from it.

As part of my code, the code will check whether those things are performed.
If performed, the combox box will disable, and the users will receive a
message that since those things are performed, the combo box will not be
available.

Is it possible to disable the combo box? Could you help me with the code?

Thanks.
 
Reply With Quote
 
 
 
 
Sam Wilson
Guest
Posts: n/a
 
      9th Oct 2009
add this to the end of your code:

cmb_YourComboBox.Enabled = false


"Souny" wrote:

> Good morning all,
>
> I have a combo box in Sheet1 of my Excel file. What I like to do is to
> disable the combo box so that when users click on it, nothing would happen
> and selections would not display.
>
> I would like to share a little background related to what I am looking for.
> I have a code to perform a list of things on Sheet1 (and combo box is one of
> those things). After a list of those things has performed, I want to disable
> the combo box so that users can not revisit the combo box to make a selection
> from it.
>
> As part of my code, the code will check whether those things are performed.
> If performed, the combox box will disable, and the users will receive a
> message that since those things are performed, the combo box will not be
> available.
>
> Is it possible to disable the combo box? Could you help me with the code?
>
> Thanks.

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      9th Oct 2009
is this the activeX combo?

Sheet1.ComboBox1.Visible = False
or
worksheets("Sheet1").ComboBox1.Visible = False

with the forms control, set it to the macro, cnage the name appropriately

Sub DropDown2_Change()
With Sheet1.Shapes("Drop Down 2")
..Visible = msoFalse
End With
End Sub

"Souny" wrote:

> Good morning all,
>
> I have a combo box in Sheet1 of my Excel file. What I like to do is to
> disable the combo box so that when users click on it, nothing would happen
> and selections would not display.
>
> I would like to share a little background related to what I am looking for.
> I have a code to perform a list of things on Sheet1 (and combo box is one of
> those things). After a list of those things has performed, I want to disable
> the combo box so that users can not revisit the combo box to make a selection
> from it.
>
> As part of my code, the code will check whether those things are performed.
> If performed, the combox box will disable, and the users will receive a
> message that since those things are performed, the combo box will not be
> available.
>
> Is it possible to disable the combo box? Could you help me with the code?
>
> Thanks.

 
Reply With Quote
 
Souny
Guest
Posts: n/a
 
      9th Oct 2009
Sam,

Thanks for the code. Is the code supposted to be:

Worksheets("Sheet1").comboxboxname.enabled = false

Thanks.

"Sam Wilson" wrote:

> add this to the end of your code:
>
> cmb_YourComboBox.Enabled = false
>
>
> "Souny" wrote:
>
> > Good morning all,
> >
> > I have a combo box in Sheet1 of my Excel file. What I like to do is to
> > disable the combo box so that when users click on it, nothing would happen
> > and selections would not display.
> >
> > I would like to share a little background related to what I am looking for.
> > I have a code to perform a list of things on Sheet1 (and combo box is one of
> > those things). After a list of those things has performed, I want to disable
> > the combo box so that users can not revisit the combo box to make a selection
> > from it.
> >
> > As part of my code, the code will check whether those things are performed.
> > If performed, the combox box will disable, and the users will receive a
> > message that since those things are performed, the combo box will not be
> > available.
> >
> > Is it possible to disable the combo box? Could you help me with the code?
> >
> > Thanks.

 
Reply With Quote
 
Souny
Guest
Posts: n/a
 
      9th Oct 2009
Patrick,

Thanks for the code. I am using activeX combo, not Forms combo.

If I use the following, would it make the combo box disappear?

worksheets("sheet1").combobox1.visible = false

I don't want it to disappear. I want it so that when users click on it,
nothing would happen.

Thanks.

"Patrick Molloy" wrote:

> is this the activeX combo?
>
> Sheet1.ComboBox1.Visible = False
> or
> worksheets("Sheet1").ComboBox1.Visible = False
>
> with the forms control, set it to the macro, cnage the name appropriately
>
> Sub DropDown2_Change()
> With Sheet1.Shapes("Drop Down 2")
> .Visible = msoFalse
> End With
> End Sub
>
> "Souny" wrote:
>
> > Good morning all,
> >
> > I have a combo box in Sheet1 of my Excel file. What I like to do is to
> > disable the combo box so that when users click on it, nothing would happen
> > and selections would not display.
> >
> > I would like to share a little background related to what I am looking for.
> > I have a code to perform a list of things on Sheet1 (and combo box is one of
> > those things). After a list of those things has performed, I want to disable
> > the combo box so that users can not revisit the combo box to make a selection
> > from it.
> >
> > As part of my code, the code will check whether those things are performed.
> > If performed, the combox box will disable, and the users will receive a
> > message that since those things are performed, the combo box will not be
> > available.
> >
> > Is it possible to disable the combo box? Could you help me with the code?
> >
> > Thanks.

 
Reply With Quote
 
Souny
Guest
Posts: n/a
 
      9th Oct 2009
Sam,

I got it. I misunderstood what you said. The code should be:

comboboxname.enabled = false

That is a very simple code. I didn't know that it would be that simple.

Thanks again.

"Sam Wilson" wrote:

> add this to the end of your code:
>
> cmb_YourComboBox.Enabled = false
>
>
> "Souny" wrote:
>
> > Good morning all,
> >
> > I have a combo box in Sheet1 of my Excel file. What I like to do is to
> > disable the combo box so that when users click on it, nothing would happen
> > and selections would not display.
> >
> > I would like to share a little background related to what I am looking for.
> > I have a code to perform a list of things on Sheet1 (and combo box is one of
> > those things). After a list of those things has performed, I want to disable
> > the combo box so that users can not revisit the combo box to make a selection
> > from it.
> >
> > As part of my code, the code will check whether those things are performed.
> > If performed, the combox box will disable, and the users will receive a
> > message that since those things are performed, the combo box will not be
> > available.
> >
> > Is it possible to disable the combo box? Could you help me with the code?
> >
> > Thanks.

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      12th Oct 2009
ok
so change visible=False to enabled=False

"Souny" wrote:

> Patrick,
>
> Thanks for the code. I am using activeX combo, not Forms combo.
>
> If I use the following, would it make the combo box disappear?
>
> worksheets("sheet1").combobox1.visible = false
>
> I don't want it to disappear. I want it so that when users click on it,
> nothing would happen.
>
> Thanks.
>
> "Patrick Molloy" wrote:
>
> > is this the activeX combo?
> >
> > Sheet1.ComboBox1.Visible = False
> > or
> > worksheets("Sheet1").ComboBox1.Visible = False
> >
> > with the forms control, set it to the macro, cnage the name appropriately
> >
> > Sub DropDown2_Change()
> > With Sheet1.Shapes("Drop Down 2")
> > .Visible = msoFalse
> > End With
> > End Sub
> >
> > "Souny" wrote:
> >
> > > Good morning all,
> > >
> > > I have a combo box in Sheet1 of my Excel file. What I like to do is to
> > > disable the combo box so that when users click on it, nothing would happen
> > > and selections would not display.
> > >
> > > I would like to share a little background related to what I am looking for.
> > > I have a code to perform a list of things on Sheet1 (and combo box is one of
> > > those things). After a list of those things has performed, I want to disable
> > > the combo box so that users can not revisit the combo box to make a selection
> > > from it.
> > >
> > > As part of my code, the code will check whether those things are performed.
> > > If performed, the combox box will disable, and the users will receive a
> > > message that since those things are performed, the combo box will not be
> > > available.
> > >
> > > Is it possible to disable the combo box? Could you help me with the code?
> > >
> > > Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling values in a combo box.... mattieflo Microsoft Access Forms 4 12th Dec 2007 06:55 PM
Disabling of the combo box Swati Microsoft Access Form Coding 1 26th Feb 2004 06:06 AM
Disabling WIN + B hotkey combo Ian Windows XP General 0 14th Aug 2003 03:11 AM
Re: Disabling typing in a combo-box Richard Choate Microsoft Access Form Coding 0 11th Jul 2003 11:23 PM
Disabling typing in a combo-box Cameron Sutherland Microsoft Access Form Coding 1 11th Jul 2003 10:52 PM


Features
 

Advertising
 

Newsgroups
 


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