Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
User Form Text Boxes - Copy format of text boxes NDBC Excel Discussion (Misc queries) 3 July 2nd 09 02:02 AM
How do I preserve text boxes in a chart during copy/paste? RachelG Charts and Charting in Excel 1 October 5th 08 12:30 PM
copy/paste drop down boxes (forms) without locking cell link? ryerye Excel Discussion (Misc queries) 1 July 13th 07 04:49 AM
Copy and Paste Check Boxes Dolphinv4 Excel Discussion (Misc queries) 0 May 29th 07 07:40 AM
VBA Code- Copy and paste into a generic text box Bourbon[_18_] Excel Programming 0 January 23rd 04 02:42 PM


All times are GMT +1. The time now is 12:12 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"