Add cell values to a TextBox

BasicUserWithExp

New Member
Joined
Feb 15, 2018
Messages
10
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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,214,591
Messages
6,120,425
Members
448,961
Latest member
nzskater

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