Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Copy Text Box Contents into Rows

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Copy Text Box Contents into Rows

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" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Copy Text Box Contents into Rows

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" a écrit dans le message de groupe de
discussion : ...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA - Insert row, copy contents of original row except for contents of column A Royzer Excel Programming 4 February 21st 12 02:47 PM
Copy text box contents John Pierce Excel Programming 3 August 13th 08 04:13 AM
Copy cell contents in empty rows below it till any unempty row com vtmalhan Excel Discussion (Misc queries) 1 February 11th 08 11:26 AM
Can I copy cell contents to an autoshape as text using a macro? Syndrome Excel Programming 1 July 11th 06 01:16 PM
How do I copy the contents of a range of text cells and paste into one cell? davfin Excel Discussion (Misc queries) 7 July 4th 06 08:16 AM


All times are GMT +1. The time now is 07:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"