PC Review


Reply
Thread Tools Rate Thread

3-position switch control

 
 
jafsonic
Guest
Posts: n/a
 
      12th Nov 2008
I would like to allow a user to select data with 3 options. I've used
checkboxes when the option is just on or off (incomplete or
complete). Sometimes the data does not apply, so I'd like a
"checkbox" which allows 3 conditions: N/A, on (complete), and off
(pending/incomplete).

I'm already using VBA macros to implement changes based on the
checkboxes. It would be nice to tie code options based on a 3 (or
more) position switch control. Is there such a thing?
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      12th Nov 2008
Consider a userform with radio buttons
--
Gary''s Student - gsnu200813


"jafsonic" wrote:

> I would like to allow a user to select data with 3 options. I've used
> checkboxes when the option is just on or off (incomplete or
> complete). Sometimes the data does not apply, so I'd like a
> "checkbox" which allows 3 conditions: N/A, on (complete), and off
> (pending/incomplete).
>
> I'm already using VBA macros to implement changes based on the
> checkboxes. It would be nice to tie code options based on a 3 (or
> more) position switch control. Is there such a thing?
>

 
Reply With Quote
 
John Bundy
Guest
Posts: n/a
 
      13th Nov 2008
I like spin buttons. Use the spin up and down to cycle through the options
and display in a textbox.

Dim myOption As Integer
Dim DisplayText As String

Private Sub SpinButton1_SpinDown()
myOption = myOption - 1
If myOption = 0 Then myOption = 3
SetText
End Sub
Private Sub SpinButton1_SpinUp()
If myOption = 3 Then myOption = 0
myOption = myOption + 1
SetText
End Sub
Private Sub UserForm_Activate()
myOption = 1
SetText
End Sub
Sub SetText()
If myOption = 1 Then TextBox1.Text = "N/A"
If myOption = 2 Then TextBox1.Text = "On (complete)"
If myOption = 3 Then TextBox1.Text = "Off (pending/incomplete)"

End Sub

--
-John http://jmbundy.blogspot.com
Please rate when your question is answered to help us and others know what
is helpful.


"jafsonic" wrote:

> I would like to allow a user to select data with 3 options. I've used
> checkboxes when the option is just on or off (incomplete or
> complete). Sometimes the data does not apply, so I'd like a
> "checkbox" which allows 3 conditions: N/A, on (complete), and off
> (pending/incomplete).
>
> I'm already using VBA macros to implement changes based on the
> checkboxes. It would be nice to tie code options based on a 3 (or
> more) position switch control. Is there such a thing?
>

 
Reply With Quote
 
jafsonic
Guest
Posts: n/a
 
      13th Nov 2008
On Nov 12, 3:16*pm, Gary''s Student
<GarysStud...@discussions.microsoft.com> wrote:
> Consider a userform with radio buttons
> --
> Gary''s Student - gsnu200813
>
>
>
> "jafsonic" wrote:
> > I would like to allow a user to select data with 3 options. *I've used
> > checkboxes when the option is just on or off (incomplete or
> > complete). *Sometimes the data does not apply, so I'd like a
> > "checkbox" which allows 3 conditions: *N/A, on (complete), and off
> > (pending/incomplete).

>
> > I'm already using VBA macros to implement changes based on the
> > checkboxes. *It would be nice to tie code options based on a 3 (or
> > more) position switch control. *Is there such a thing?- Hide quoted text -

>
> - Show quoted text -


Thanks. I thought about a userform option and even radio buttons on
the sheet, but wasn't going that way since this a relatively simple
status page intended for real-time updating in front of an audience
who probably arent' going to want to watch you navigate forms. It may
still be an option though.
 
Reply With Quote
 
jafsonic
Guest
Posts: n/a
 
      13th Nov 2008
On Nov 12, 7:49*pm, John Bundy <jmbu...@gmail.com(remove)> wrote:
> I like spin buttons. Use the spin up and down to cycle through the options
> and display in a textbox.
>
> Dim myOption As Integer
> Dim DisplayText As String
>
> Private Sub SpinButton1_SpinDown()
> myOption = myOption - 1
> If myOption = 0 Then myOption = 3
> SetText
> End Sub
> Private Sub SpinButton1_SpinUp()
> If myOption = 3 Then myOption = 0
> myOption = myOption + 1
> SetText
> End Sub
> Private Sub UserForm_Activate()
> myOption = 1
> SetText
> End Sub
> Sub SetText()
> If myOption = 1 Then TextBox1.Text = "N/A"
> If myOption = 2 Then TextBox1.Text = "On (complete)"
> If myOption = 3 Then TextBox1.Text = "Off (pending/incomplete)"
>
> End Sub
>
> --
> -Johnhttp://jmbundy.blogspot.com
> Please rate when your question is answered to help us and others know what
> is helpful.
>
>
>
> "jafsonic" wrote:
> > I would like to allow a user to select data with 3 options. *I've used
> > checkboxes when the option is just on or off (incomplete or
> > complete). *Sometimes the data does not apply, so I'd like a
> > "checkbox" which allows 3 conditions: *N/A, on (complete), and off
> > (pending/incomplete).

>
> > I'm already using VBA macros to implement changes based on the
> > checkboxes. *It would be nice to tie code options based on a 3 (or
> > more) position switch control. *Is there such a thing?- Hide quoted text -

>
> - Show quoted text -


Yeah, ok, that's an option. I worry a little about real estate since
there may be a lot of these on a sheet, but it would be clear to use
either a spin button or even just a list/combo box.

Hmm... maybe a double-click option on a checkbox would work to turn
the state from active to N/A, then a single click for pending vs.
complete. What do you think?
 
Reply With Quote
 
Jim Cone
Guest
Posts: n/a
 
      13th Nov 2008
Set the TripleState property to True
--
Jim Cone
Portland, Oregon USA



"jafsonic"
wrote in message
I would like to allow a user to select data with 3 options. I've used
checkboxes when the option is just on or off (incomplete or
complete). Sometimes the data does not apply, so I'd like a
"checkbox" which allows 3 conditions: N/A, on (complete), and off
(pending/incomplete).

I'm already using VBA macros to implement changes based on the
checkboxes. It would be nice to tie code options based on a 3 (or
more) position switch control. Is there such a thing?
 
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
Switch the position of start button to right. Muhammad Abid Windows XP Customization 1 8th Apr 2010 04:48 PM
Outlook 2003 Toolbars Switch Position When Replying ChicagoIrish Microsoft Outlook Discussion 0 23rd Sep 2008 12:51 AM
Excel 2003 Line Chart - Switch Axis Position =?Utf-8?B?c290?= Microsoft Excel Charting 2 27th Sep 2007 01:12 PM
How to switch position of columns and rows respectively? Epinn Microsoft Excel Worksheet Functions 7 2nd Nov 2006 09:00 PM
Can I switch the position of tabbed columns w/o retyping? =?Utf-8?B?TGVlYW5zdWVhZw==?= Microsoft Word Document Management 1 5th May 2005 04:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:32 PM.