title: Graying out Visual Basic radio
body: <p>I am making an apartment rental form using Visual Basic (Express 2010) and I need to gray out some radio buttons when another radio button is selected. Right now, the graying out itself isn't a problem, i.e. I can get the radio buttons grayed out, but not when I want it to.</p>
  
  <p>I need to click on a button on the form to get the specific  radio buttons grayed out, but I want them grayed out when I click on another radio button.</p>
  
  <p>Here's how I have implemented the subroutine, but they don't work like I had planned them to.</p>
  
  <pre><code>Private Sub grpBedrooms_CheckedChanged() Handles grpBedrooms.MouseClick
  
      If rdoOneBed.Checked Then
          Call EnableOneBath()
          Call DisableTwoBaths()
      End If
  
      If rdoOneBedDen.Checked Then
          Call EnableOneBath()
          Call DisableTwoBaths()
      End If
  
      If rdoTwoBeds.Checked Then
          Call EnableTwoBaths()
          Call DisableOneBath()
      End If
  
      grpBedrooms.Refresh()
  
  End Sub
  </code></pre>
  
  <p>So basically, I want DisableOneBath() or DisableTwoBaths() to be activated immediately when I click on the radios rdoOneBed or rdoTwoBeds, etc.</p>
  
  <p>The code for actually graying out the radios is this:</p>
  
  <pre><code> Private Sub DisableTwoBaths()
      Me.rdoTwoBaths.Enabled = False
  End Sub
  </code></pre>
  
  <p>Thank you for your help! </p>