UserForm - Text Box Code (Whatever Text Has Been Entered Into The Userform To Be Put Into Multiple Default Cells)

tdownwa

New Member
Joined
Jul 27, 2011
Messages
4
I've created a userform with a text box and a command button (Enter)

On clicking the command button I'd like whatever text (mutiple lines of text copied from a .doc) that has been entered into the userform to be put into a cells starting with A1 and thru the row if applicable or down the column if applicable.


I thought using: Sheet1.Range("$A$1:$P:300").Value = Me.TextBox1.Value might work but that pastes all the data from the userform into every cell listed in that range.

I then tried Sheet1.Range("A1").Value = Me.TextBox1.Value thinking that might work but that only puts the data in a specfic cell.

Maybe I shouldnt be trying to force it as a Range...

Below is a screen shots examples of what I'm trying to get accomplished. Oh and one last thing... the size of the data continually changes. its not always the size shown below.

Thanks in advance!


Excel.jpg
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
I figured this out on my own... please close.

answer = Sheet1.Range("A1").PasteSpecial Paste:=xlPasteFormulasAndNumberFormats = Me.TextBox1.Value
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,283
Members
452,902
Latest member
Knuddeluff

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