View Full Version : Text Box Data to be Copied


asingh
12-19-2005, 07:28 AM
Hi,
i have a text box on my excell sheet. I want to copy the contents to my clipboard. I am trying the following but it is not working...nothing comes onto the clipboard

Sheet1.TextBoxDataDsply.Enabled = True

Sheet1.TextBoxDataDsply.SelStart = 0
Sheet1.TextBoxDataDsply.SelLength = 100
Sheet1.TextBoxDataDsply.Copy

Brianwarnock
12-20-2005, 01:05 AM
I'm no expert on this but I think you need to do something like

Worksheets(1).Shapes.SelectAll
Selection.Copy

Brian

asingh
12-20-2005, 09:01 AM
i tried the above mentioned...it is not working....I get an out of memory run error.........!

Pieter
12-21-2005, 10:36 AM
Hi,
you'll need to activate the textbox first.
example:
Dim text As String
Worksheets(1).Shapes("text box 1").Select
text = Selection.text
MsgBox text

ps: the name of the texbox can be found in the name-box on the left of the formulabar
I asume that a selection.copy will do the job for you
Pieter

asingh
12-21-2005, 03:13 PM
Hi,
I tried the above mentioned... I get an "Object doesn't support this property or method" error at the line: "text = Selection.text"