Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Option Button?? Help

Hello, I posted this same question in another discussion group, but I
actually meant to post it on this one.

My question is: Why doesnt this work. I know it works for a check box but I
dont know how to make it to do the same function using the option buttons.

Private Sub OptionButton1_Click()
Me.TextBox1.Enabled = Not Me.OptionButton1.Value
Me.TextBox2.Enabled = Not Me.OptionButton1.Value
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Option Button?? Help

If you're clicking on the optionbutton, aren't you always turning it on?

Maybe using
Private Sub OptionButton1_Change()
would be better.

N.F wrote:

Hello, I posted this same question in another discussion group, but I
actually meant to post it on this one.

My question is: Why doesnt this work. I know it works for a check box but I
dont know how to make it to do the same function using the option buttons.

Private Sub OptionButton1_Click()
Me.TextBox1.Enabled = Not Me.OptionButton1.Value
Me.TextBox2.Enabled = Not Me.OptionButton1.Value
End Sub


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Option Button?? Help

Not sure but you probably need to add another option button

"N.F" wrote:

Hello, I posted this same question in another discussion group, but I
actually meant to post it on this one.

My question is: Why doesnt this work. I know it works for a check box but I
dont know how to make it to do the same function using the option buttons.

Private Sub OptionButton1_Click()
Me.TextBox1.Enabled = Not Me.OptionButton1.Value
Me.TextBox2.Enabled = Not Me.OptionButton1.Value
End Sub

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
need help on how to grey out one option button in one group box based on the selection of another option button in another group box George Excel Programming 12 March 11th 07 02:08 PM
Option Button Pieter van der Walt New Users to Excel 2 March 27th 06 12:02 PM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
option button? Pete Excel Programming 2 September 11th 05 02:51 PM
Option button help justaguyfromky Excel Programming 1 September 5th 05 10:17 PM


All times are GMT +1. The time now is 12:24 PM.

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"