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

Status
Not open for further replies.

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 shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Status
Not open for further replies.

Forum statistics

Threads
1,224,508
Messages
6,179,189
Members
452,893
Latest member
denay

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