ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,683
- Office Version
- 2007
- Platform
- Windows
Hi,
I wish to display a dirrerent vlaue in a Textbox depending on what optionbutton was selected.
The user will select either option button 8 "ONE LINE" or option button 9 " TWO LINES"
The user will then select another option button for "LOGO STYLE" so in this example option button 6 "QUESTION" is selected
There are now two values that could be placed in TextBox 5 "+ vbQueston " OR " , vbQuestion"
It should work like this,
Select option button 8 "ONE LINE"
Select option button 6
TextBox6 should now show + vbQuestion
BUT
Select option button 9 "TWO LINES"
Select option button 6
TextBox6 should now show , vbQuestion
My code is shown below of which doesnt work.
Please see screenshot
I wish to display a dirrerent vlaue in a Textbox depending on what optionbutton was selected.
The user will select either option button 8 "ONE LINE" or option button 9 " TWO LINES"
The user will then select another option button for "LOGO STYLE" so in this example option button 6 "QUESTION" is selected
There are now two values that could be placed in TextBox 5 "+ vbQueston " OR " , vbQuestion"
It should work like this,
Select option button 8 "ONE LINE"
Select option button 6
TextBox6 should now show + vbQuestion
BUT
Select option button 9 "TWO LINES"
Select option button 6
TextBox6 should now show , vbQuestion
My code is shown below of which doesnt work.
Rich (BB code):
Private Sub OptionButton6_Click()
If OptionButton8 = True Then
If OptionButton6 = True Then
TextBox5.TEXT = "+ vbQuestion,"
Else
If OptionButton9 = True Then
If OptionButton6 = True Then
TextBox5.TEXT = ", vbQuestion,"
End If
End If
End If
End If
End Sub
Please see screenshot