'Building a text in TextBox based on Radio choices in VBA

I am trying to build a VBA code that help build a text in a text box based on Radio choices (as in screen attached)

screen

I want the lines- 1st or 2nd - in the texted box to changed based on the 1st question and it's answer.

I tried the codes below but none of them works

Sub Macro5()
'
' Macro5 Macro
'

'
    ActiveSheet.Shapes.Range(Array("TextBox 1")).Select
    Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = _
        "1 No I am not here"
    Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 32).ParagraphFormat. _
        FirstLineIndent = 0
    With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 11).Font
        .NameComplexScript = "+mn-cs"
        .NameFarEast = "+mn-ea"
        .Fill.Visible = msoTrue
        .Fill.ForeColor.ObjectThemeColor = msoThemeColorDark1
        .Fill.ForeColor.TintAndShade = 0
        .Fill.ForeColor.Brightness = 0
        .Fill.Transparency = 0
        .Fill.Solid
        .Size = 11
        .Name = "+mn-lt"
    End With
    With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(12, 21).Font
        .BaselineOffset = 0
        .NameComplexScript = "+mn-cs"
        .NameFarEast = "+mn-ea"
        .Fill.Visible = msoTrue
        .Fill.ForeColor.ObjectThemeColor = msoThemeColorDark1
        .Fill.ForeColor.TintAndShade = 0
        .Fill.ForeColor.Brightness = 0
        .Fill.Transparency = 0
        .Fill.Solid
        .Size = 11
        .Name = "+mn-lt"
    End With
End Sub

This



Solution 1:[1]

In my oppion best idea is to create new UserForm for.ex Example of User form

With options to Finish/Cancel/Change answer :) And after final "Finish" just send it to range or cell :)

For TextBox, you will need to enable MultiLine.

For Option Buttons you will need to lock them and publish text or unlock them and delete text from TextBox if somebody clicks "Unlock/Change" near "Yes/No" options :).

Fro ex. code for Option Button

Private Sub OptionButton4_Click()
     TextBox1.Text = TextBox1.Text & vbCrLf & "2. Yes the Sun is out" & vbCrLf 'vbCrLf stands for "next line"
     OptionButton3.Locked = True
     OptionButton4.Locked = True
End Sub

In my opion it's easiest and best idea for this work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 p77u77n77k