Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code-Copy & Paste in Text Boxes
Thanks Jon, I am trying to copy and paste the data in columms A,C and
into each text box that was selected in columm E. (by the code yo described)Thus, data for example from A1,C2 and D1 will be pasted int the text box appearing in E1. And so on.... So a code that will do tha for every text box that is in columm E?? This is a part of my code: ActiveSheet.Shapes.Range(shape_names).Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Shapes.Range(shape_names).Select ActiveCell.FormulaR1C1 = "11/3/2000" ActiveSheet.Shapes.Range(shape_names).Select Selection.Characters.Text = "11/3/2000" & Chr(10) & "" With Selection.Characters(Start:=1, Length:=10).Font But it will not recognize the Text in the second to last line and guess it will do the same for columms C and D..... Anyone have any ideas as to how to do this? Thanks B -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code-Copy & Paste in Text Boxes
Sub Tester10()
Dim shape_names() Dim tbox As TextBox Dim tboxs As TextBoxes n = 0 ReDim shape_names(0 To 0) For Each tbox In ActiveSheet.TextBoxes If tbox.TopLeftCell.Column = 5 Then ReDim Preserve shape_names(0 To n) shape_names(n) = tbox.Name n = n + 1 End If Next Set tboxs = ActiveSheet.TextBoxes(shape_names) tboxs.BringToFront tboxs.Select ActiveCell.FormulaR1C1 = "11/3/2000" For Each tbox In tboxs tbox.Text = "11/3/2000" & Chr(10) & "" Next End Sub -- Regards, Tom Ogilvy Bourbon wrote in message ... Thanks Jon, I am trying to copy and paste the data in columms A,C and D into each text box that was selected in columm E. (by the code you described)Thus, data for example from A1,C2 and D1 will be pasted into the text box appearing in E1. And so on.... So a code that will do that for every text box that is in columm E?? This is a part of my code: ActiveSheet.Shapes.Range(shape_names).Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Shapes.Range(shape_names).Select ActiveCell.FormulaR1C1 = "11/3/2000" ActiveSheet.Shapes.Range(shape_names).Select Selection.Characters.Text = "11/3/2000" & Chr(10) & "" With Selection.Characters(Start:=1, Length:=10).Font But it will not recognize the Text in the second to last line and I guess it will do the same for columms C and D..... Anyone have any ideas as to how to do this? Thanks B. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Form Text Boxes - Copy format of text boxes | Excel Discussion (Misc queries) | |||
How do I preserve text boxes in a chart during copy/paste? | Charts and Charting in Excel | |||
copy/paste drop down boxes (forms) without locking cell link? | Excel Discussion (Misc queries) | |||
Copy and Paste Check Boxes | Excel Discussion (Misc queries) | |||
VBA Code- Copy and paste into a generic text box | Excel Programming |