Select option button if text present

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,233
Office Version
  1. 2007
Platform
  1. Windows
Hi,
Please can you advise how optionButton1 can be automatically selected if text is present in TextBox4
No text then no selection

Thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Do you mean set optionButton1 to True if there's a change in Textbox4 AND Textbox4 isn't blank? If that's what you mean, try this code the Textbox4.
VBA Code:
Private Sub TextBox4_Change()
    If TextBox4 <> "" Then
        If OptionButton1.Value <> True Then OptionButton1.Value = True
    Else
        OptionButton1.Value = False
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,501
Messages
6,125,169
Members
449,212
Latest member
kenmaldonado

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top