Cells(Selection.Row, 1) = TextBox1 & IIf(TextBox2 = "", "", "*" & TextBox2) & IIf(TextBox3 = "", "", "*" & TextBox3)
Private Sub CommandButton1_Click()
Cells(ActiveCell.Row, 1) = ""
For i = 1 To 3
If Me.Controls("textbox" & i) <> "" Then Cells(ActiveCell.Row, 1) = Cells(ActiveCell.Row, 1) & Me.Controls("textbox" & i) & vbLf
Next i
If OptionButton2 Then Cells(ActiveCell.Row, 1).Font.Size = 8
Unload Me
End Sub
Private Sub CommandButton1_Click()
Dim I As Byte
Dim Tmp
For I = 1 To 3
If Me.Controls("TextBox" & I) <> "" Then
Tmp = Tmp & Me.Controls("TextBox" & I) & vbLf
End If
Next I
If Tmp <> "" Then
With Cells(ActiveCell.Row, 1)
If OptionButton2 Then .Value = Left(Tmp, Len(Tmp) - 1)
If OptionButton2 Then .Font.Size = 8
End With
End If
Unload Me
End Sub
Private Sub CommandButton1_Click()
Dim res(), elem, s$
res = Array(TextBox1.Value, TextBox2.Value, TextBox3.Value)
For Each elem In res
s = IIf(s = "", IIf(elem = "", "", elem), IIf(elem = "", s, s & "*" & elem))
Next elem
If OptionButton1 Then
Cells(ActiveCell.Row, 1).Font.Size = 10: Cells(ActiveCell.Row, 1) = s
ElseIf OptionButton2 Then
Cells(ActiveCell.Row, 1).Font.Size = 8: Cells(ActiveCell.Row, 1) = Replace(s, "*", vbLf)
Else
Cells(ActiveCell.Row, 1) = s
End If
Unload UserForm1
End Sub
Private Sub CommandButton1_Click()
temp = IIf(TextBox1 = "", "", TextBox1 & vbLf) & IIf(TextBox2 = "", "", TextBox2 & vbLf) & TextBox3
Cells(ActiveCell.Row, 1) = Mid(temp, 1, Len(temp) + (Right(temp, 1) = vbLf))
If OptionButton2 Then Cells(ActiveCell.Row, 1).Font.Size = 8
Unload Me
End Sub