VBA Help

  • Thread starter Thread starter Rw
  • Start date Start date
R

Rw

In a user form I have 6 radio buttons, 3 inside one frame, and 3
indentical inside another frame. I want to be able to make it so that
the radio button selected in one frame cannot be the same in the other
frame? Hopefully this can be solved!
Thanks

** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Software! Free Support at
http://www.ozgrid.com/forum/ **
 
If I understand you correctly:

Assume Options Buttons1-3 in Frame1, OptionButtons4-6 in Frame2:

Private Sub OptionButton1_Click()
OptionButton2.Enabled = Not OptionButton5.Value
OptionButton3.Enabled = Not OptionButton6.Value
OptionButton4.Enabled = False
OptionButton5.Enabled = True
OptionButton6.Enabled = True
End Sub
Private Sub OptionButton2_Click()
OptionButton1.Enabled = Not OptionButton4.Value
OptionButton3.Enabled = Not OptionButton6.Value
OptionButton4.Enabled = True
OptionButton5.Enabled = False
OptionButton6.Enabled = True
End Sub
Private Sub OptionButton3_Click()
OptionButton1.Enabled = Not OptionButton4.Value
OptionButton2.Enabled = Not OptionButton5.Value
OptionButton4.Enabled = True
OptionButton5.Enabled = True
OptionButton6.Enabled = False
End Sub

Private Sub OptionButton4_Click()
OptionButton1.Enabled = False
OptionButton2.Enabled = True
OptionButton3.Enabled = True
OptionButton5.Enabled = Not OptionButton2.Value
OptionButton6.Enabled = Not OptionButton3.Value
End Sub
Private Sub OptionButton5_Click()
OptionButton1.Enabled = True
OptionButton2.Enabled = False
OptionButton3.Enabled = True
OptionButton4.Enabled = Not OptionButton1.Value
OptionButton6.Enabled = Not OptionButton3.Value
End Sub
Private Sub OptionButton6_Click()
OptionButton1.Enabled = True
OptionButton2.Enabled = True
OptionButton3.Enabled = False
OptionButton4.Enabled = Not OptionButton1.Value
OptionButton5.Enabled = Not OptionButton2.Value
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

sending attachement 1
VBA Loops 1
help with division 1
Can Fkeys be used similiar to _beforedoubleclick( 1
user forms 1
numeric amount in word figers 2
Every Other Row 2
User Defined Function 2

Back
Top