Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA - Insert row, copy contents of original row except for contents of column A | Excel Programming | |||
Copy text box contents | Excel Programming | |||
Copy cell contents in empty rows below it till any unempty row com | Excel Discussion (Misc queries) | |||
Can I copy cell contents to an autoshape as text using a macro? | Excel Programming | |||
How do I copy the contents of a range of text cells and paste into one cell? | Excel Discussion (Misc queries) |