Copy cells to Userform Textbox

Jaye7

Well-known Member
Joined
Jul 7, 2010
Messages
1,060
I am after a script which copies cells A1:A20 into a userform textbox.

Your help would be appreciated.
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Your idea seems vague to me...seems pretty easy but not sure what you are up to...

There are experts in here who can help if you can explain what you want more clearly:biggrin:



for now...may be you can link by going in to properties....to the cell
or assign a code like..

cells(1).value = textbox1.value

I am not sure wat u're up as said...since you want range A1:A20 to be copied to a userform text box....:confused:
 

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
8,118
Office Version
  1. 2016
Platform
  1. Windows
Maybe this :

Code:
Private Sub UserForm_Initialize()
 
    With TextBox1
        .MultiLine = True
        .ScrollBars = fmScrollBarsBoth
        .Text = Join(Application.Transpose(Range("a1:a20")), vbCr)
        .SelStart = 0
    End With
 
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,122,970
Messages
5,599,106
Members
414,287
Latest member
Rbwester

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
Top