How to keep adding values from a cell value to a text box

jvinces

New Member
Joined
Dec 9, 2022
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
How can I display on a text box(or whatever is easier honestly) the values from D4, E4 and F4?
I want to keep adding the values of those cells to a text box.
Currently I can display the contents of those cells in a text box, but I want to keep adding more values.
So essentially, if the first set of value is "John's car is red", that will this play in the text box using a command button(code below) but now I want to keep "John's car is red"
in the text box but also be able to add more values like "Matt's bike is yellow" etc etc.
When I keep changing the values of those 3 cells, it also changes on the text box.


Private Sub CommandButton2_Click()

If Me.TextBox1.Visible = True Then
Me.TextBox1.Visible = False
Else
Me.TextBox1.Visible = True
End If

Dim avarTest As String

avarTest = Range("D4").Value & " " & Range("E4").Value & " " & Range("F4").Value & ", "
TextBox1.Value = avarTest

End Sub


Thanks in advanced!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,091
Latest member
gaurav_7829

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