Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Option button controlling text box

G'day there One & All,

I have what I hope is a smallish problem that can easily be resolved by
someone with more knowledge than me (which is a sizeable portion of the
populace I might add).

I have a userform with a collection of 9 optionbuttons inside a frame.
There is also a single textbox. The optionbuttons describe mutually
exclusive categories with the last being for "Other". I'm trying to make
the textbox disabled & locked until the "Other" optionbutton is
selected. I think I've got that bit worked out, however if the user has
erred and then clicks one of the other options I can't find a way to
again lock & disable the textbox as the optionbutton_onclick() event
isn't captured unless you click in the option. Naturally, that's what
selects that option, not unselects it.

Elsewhere in the form I've used a checkbox to do the same thing,
however that frame's "Other" is not intended to exclude other choices
like this one is. I'd much prefer to use an optionbutton as my users are
to a large degree not particularly computer literate and I want my forms
and application to do as much of the work as possible. I don't trust any
of my users to actually RTFM <g.

Is there anyway that I can setup the "Other" optionbutton as a toggle?
Will I have to use the Frame's "Click" event to determine which
optionbutton has been selected and disable the textbox from that? (If
that works)

Any ideas would be appreciated, especially if they're simple enough
that I can understand what the heck is going on.

See ya
Ken McLennan
Qld, Australia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Option button controlling text box

Ken,

I think you are going to have to put a test in each of the other option
buttons and if one of those is clicked, disable the textbox.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Ken McLennan" wrote in message
.. .
G'day there One & All,

I have what I hope is a smallish problem that can easily be resolved by
someone with more knowledge than me (which is a sizeable portion of the
populace I might add).

I have a userform with a collection of 9 optionbuttons inside a frame.
There is also a single textbox. The optionbuttons describe mutually
exclusive categories with the last being for "Other". I'm trying to make
the textbox disabled & locked until the "Other" optionbutton is
selected. I think I've got that bit worked out, however if the user has
erred and then clicks one of the other options I can't find a way to
again lock & disable the textbox as the optionbutton_onclick() event
isn't captured unless you click in the option. Naturally, that's what
selects that option, not unselects it.

Elsewhere in the form I've used a checkbox to do the same thing,
however that frame's "Other" is not intended to exclude other choices
like this one is. I'd much prefer to use an optionbutton as my users are
to a large degree not particularly computer literate and I want my forms
and application to do as much of the work as possible. I don't trust any
of my users to actually RTFM <g.

Is there anyway that I can setup the "Other" optionbutton as a toggle?
Will I have to use the Frame's "Click" event to determine which
optionbutton has been selected and disable the textbox from that? (If
that works)

Any ideas would be appreciated, especially if they're simple enough
that I can understand what the heck is going on.

See ya
Ken McLennan
Qld, Australia



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Option button controlling text box

Can't you just put something like following in the change
event for the "other" option button?

Private Sub OptionOTHER_Change()
TextBox1 = ""
TextBox1.Enabled = OptionOTHER.Value
End Sub


-----Original Message-----
G'day there One & All,

I have what I hope is a smallish problem that can easily

be resolved by
someone with more knowledge than me (which is a sizeable

portion of the
populace I might add).

I have a userform with a collection of 9 optionbuttons

inside a frame.
There is also a single textbox. The optionbuttons

describe mutually
exclusive categories with the last being for "Other". I'm

trying to make
the textbox disabled & locked until the "Other"

optionbutton is
selected. I think I've got that bit worked out, however

if the user has
erred and then clicks one of the other options I can't

find a way to
again lock & disable the textbox as the

optionbutton_onclick() event
isn't captured unless you click in the option. Naturally,

that's what
selects that option, not unselects it.

Elsewhere in the form I've used a checkbox to do the

same thing,
however that frame's "Other" is not intended to exclude

other choices
like this one is. I'd much prefer to use an optionbutton

as my users are
to a large degree not particularly computer literate and

I want my forms
and application to do as much of the work as possible. I

don't trust any
of my users to actually RTFM <g.

Is there anyway that I can setup the "Other"

optionbutton as a toggle?
Will I have to use the Frame's "Click" event to determine

which
optionbutton has been selected and disable the textbox

from that? (If
that works)

Any ideas would be appreciated, especially if they're

simple enough
that I can understand what the heck is going on.

See ya
Ken McLennan
Qld, Australia
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Option button controlling text box

There are 8 other buttons.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Libby" wrote in message
...
Can't you just put something like following in the change
event for the "other" option button?

Private Sub OptionOTHER_Change()
TextBox1 = ""
TextBox1.Enabled = OptionOTHER.Value
End Sub


-----Original Message-----
G'day there One & All,

I have what I hope is a smallish problem that can easily

be resolved by
someone with more knowledge than me (which is a sizeable

portion of the
populace I might add).

I have a userform with a collection of 9 optionbuttons

inside a frame.
There is also a single textbox. The optionbuttons

describe mutually
exclusive categories with the last being for "Other". I'm

trying to make
the textbox disabled & locked until the "Other"

optionbutton is
selected. I think I've got that bit worked out, however

if the user has
erred and then clicks one of the other options I can't

find a way to
again lock & disable the textbox as the

optionbutton_onclick() event
isn't captured unless you click in the option. Naturally,

that's what
selects that option, not unselects it.

Elsewhere in the form I've used a checkbox to do the

same thing,
however that frame's "Other" is not intended to exclude

other choices
like this one is. I'd much prefer to use an optionbutton

as my users are
to a large degree not particularly computer literate and

I want my forms
and application to do as much of the work as possible. I

don't trust any
of my users to actually RTFM <g.

Is there anyway that I can setup the "Other"

optionbutton as a toggle?
Will I have to use the Frame's "Click" event to determine

which
optionbutton has been selected and disable the textbox

from that? (If
that works)

Any ideas would be appreciated, especially if they're

simple enough
that I can understand what the heck is going on.

See ya
Ken McLennan
Qld, Australia
.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Option button controlling text box

That wouldn't matter as it's based on the change event of
the "other" option button amd the option buttons are
mutually exclusive.
If "other" was clicked then it changes to true and the
textbox is enabled.
If any of the other option buttons are clicked
then "other" will change to false and the textbox will be
disabled.

-----Original Message-----
There are 8 other buttons.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Libby" wrote in

message
...
Can't you just put something like following in the

change
event for the "other" option button?

Private Sub OptionOTHER_Change()
TextBox1 = ""
TextBox1.Enabled = OptionOTHER.Value
End Sub


-----Original Message-----
G'day there One & All,

I have what I hope is a smallish problem that can

easily
be resolved by
someone with more knowledge than me (which is a

sizeable
portion of the
populace I might add).

I have a userform with a collection of 9 optionbuttons

inside a frame.
There is also a single textbox. The optionbuttons

describe mutually
exclusive categories with the last being for "Other".

I'm
trying to make
the textbox disabled & locked until the "Other"

optionbutton is
selected. I think I've got that bit worked out, however

if the user has
erred and then clicks one of the other options I can't

find a way to
again lock & disable the textbox as the

optionbutton_onclick() event
isn't captured unless you click in the option.

Naturally,
that's what
selects that option, not unselects it.

Elsewhere in the form I've used a checkbox to do the

same thing,
however that frame's "Other" is not intended to exclude

other choices
like this one is. I'd much prefer to use an

optionbutton
as my users are
to a large degree not particularly computer literate

and
I want my forms
and application to do as much of the work as possible.

I
don't trust any
of my users to actually RTFM <g.

Is there anyway that I can setup the "Other"

optionbutton as a toggle?
Will I have to use the Frame's "Click" event to

determine
which
optionbutton has been selected and disable the textbox

from that? (If
that works)

Any ideas would be appreciated, especially if they're

simple enough
that I can understand what the heck is going on.

See ya
Ken McLennan
Qld, Australia
.



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Option button controlling text box

G'day there Bob & Libby,

That wouldn't matter as it's based on the change event of
the "other" option button amd the option buttons are
mutually exclusive.
If "other" was clicked then it changes to true and the
textbox is enabled.
If any of the other option buttons are clicked
then "other" will change to false and the textbox will be
disabled.

-----Original Message-----
There are 8 other buttons.



Well, to cut a long story short, I used a combination of both
approaches which solved another problem I was working on at the same
time. Thank you both very much for your assistance =)

The problem now, and it's a big one, is that Windows found itself
a problem in some .dll file and fixed the problem by removing all the
code and userforms I had. About 5 weeks work (part time in amongst
various computer games <g ) diappeared. I am NOT a happy camper.

That's one of the reasons I prefer to use Linux, but my employer
uses Windows and that's what I needed to work with. It's a good thing I
don't have a deadline.

See ya, and I've no doubt I'll be back if I get stumped again.
Thanks once more
Ken McLennan
Qld Australia
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Option button controlling text box

Ken,

You can't blame windows for you not having backups. If you rely on a system,
Windows, Linux or anything else, never to fail, you are asking for trouble,
and sooner or later you will get it.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Ken McLennan" wrote in message
.. .
G'day there Bob & Libby,

That wouldn't matter as it's based on the change event of
the "other" option button amd the option buttons are
mutually exclusive.
If "other" was clicked then it changes to true and the
textbox is enabled.
If any of the other option buttons are clicked
then "other" will change to false and the textbox will be
disabled.

-----Original Message-----
There are 8 other buttons.



Well, to cut a long story short, I used a combination of both
approaches which solved another problem I was working on at the same
time. Thank you both very much for your assistance =)

The problem now, and it's a big one, is that Windows found itself
a problem in some .dll file and fixed the problem by removing all the
code and userforms I had. About 5 weeks work (part time in amongst
various computer games <g ) diappeared. I am NOT a happy camper.

That's one of the reasons I prefer to use Linux, but my employer
uses Windows and that's what I needed to work with. It's a good thing I
don't have a deadline.

See ya, and I've no doubt I'll be back if I get stumped again.
Thanks once more
Ken McLennan
Qld Australia



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
Foramtting text in an option button Iriemon Excel Worksheet Functions 1 May 24th 07 07:09 PM
Formatting the text in an option (radio) button Iriemon Excel Discussion (Misc queries) 0 May 24th 07 06:58 PM
Formatting text of an option button Iriemon Excel Worksheet Functions 2 May 24th 07 04:03 PM
Controlling numerical values of option buttons in a group? Jay Weiss Excel Discussion (Misc queries) 2 May 7th 07 05:51 PM
Controlling an Option Group in a User Form SaeOngJeeMa Excel Discussion (Misc queries) 0 November 29th 06 08:17 AM


All times are GMT +1. The time now is 08:31 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"