PC Review


Reply
Thread Tools Rate Thread

Copy Text Box Contents into Rows

 
 
caveman.savant
Guest
Posts: n/a
 
      3rd Oct 2009
I have a Text box that will accept a series of comma separated phases.
By clicking a form button, I'd like to copy those phrases in rows and
a new sheet
 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      3rd Oct 2009
Where is the TextBox located at... on a UserForm or directly on the
worksheet? If on the worksheet, where did you get the TextBox from... the
Control Toolbox toolbar or the Drawing toolbar? Did you want you code to
create the new sheet before putting the results on it, or does this new
sheet already exist? In either case, what is the name of the sheet to be?
Where on the sheet did you want to start copying to... cell A1 or somewhere
else?

--
Rick (MVP - Excel)


"caveman.savant" <(E-Mail Removed)> wrote in message
news:dcd4277a-8d83-4d9b-aa22-(E-Mail Removed)...
>I have a Text box that will accept a series of comma separated phases.
> By clicking a form button, I'd like to copy those phrases in rows and
> a new sheet


 
Reply With Quote
 
michdenis
Guest
Posts: n/a
 
      3rd Oct 2009
Hi,

Try this :

'-----------------------------------
Sub Test()
Dim T As String, S As Variant

'Adapte the name of your sheet
With Worksheets("Sheet1")
'Name of your Shape
T = .Shapes("toto").OLEFormat.Object.Text
End With
'Split() required excel 2000 or a more recent version of excel
S = Split(T, ",")

'Where your phrases will copied
With Worksheets("Sheet2")
.Range("A1").Resize(UBound(S) + 1) = Application.Transpose(S)
End With

End Sub
'-----------------------------------



"caveman.savant" <(E-Mail Removed)> a écrit dans le message de groupe de
discussion : dcd4277a-8d83-4d9b-aa22-a8b870ad6dd0...oglegroups.com...
I have a Text box that will accept a series of comma separated phases.
By clicking a form button, I'd like to copy those phrases in rows and
a new sheet

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy text from cell and paste it in a separate text box (contents tobe linked) andreashermle Microsoft Excel Programming 7 13th Dec 2009 07:51 PM
find text and copy selected rows from text and loop bluewatermist Microsoft Excel Programming 4 17th Nov 2009 08:20 AM
Copy text box contents John Pierce Microsoft Excel Programming 3 13th Aug 2008 04:13 AM
Copy cell contents in empty rows below it till any unempty row com vtmalhan Microsoft Excel Misc 1 11th Feb 2008 11:26 AM
Re: Copy contents of a Column to Rows on another Sheet? Ken Wright Microsoft Excel Worksheet Functions 2 3rd Jul 2003 09:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:57 PM.