Add cell values to a TextBox

BasicUserWithExp

New Member
Joined
Feb 15, 2018
Messages
17
I have a bid form and in column R there is a predefined list of items, and in column S there is a predefined list of reasons. I would like a way to populate a TexBox with those values
Example:
R37 = Spread Footings; S37 = Blank
R38 = Grade beams; S38 = GB1-10

I would like code to then put the values in a TexBox like:

Spread Footings, Grade Beams - GB1-10,

I have a way to do it now, using CheckBoxes and it works, but when i add rows above it I have to change the code every time:

Private Sub CommandButton1_Click()


TextBox1.Text = ""


Code:
If CheckBox1.Value = True Then
    TextBox1.Text = TextBox1.Text & Range("R28").Value & " - " & Range("S28").Value & ", "
End If...

can code be created for a range? R28 to R50, and Double Click corresponding cell in column P to add?

If the same code could clear the TextBox prior to adding values, or separate code/button That would be great!
bid.JPG

bid.JPG
 
Last edited:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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