Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox.Text = >256 Character String?!?

Status
Not open for further replies.

BillDCat

Technical User
Jul 23, 2002
2
US
Hello,
I can't seem to find a way to set the value of a text box to anything that is greater than 255 (or maybe 256) characters. Anyone know how I might do this? (Note: I'm using VB6 but this seemed like a question more appropriate for this forum)

This Fails to add anything if it is really long (255/256+):

pstrLongString = "Loads of text..."
ActiveSheet.DrawingObjects("Text Box 1").Text = pstrLongString

Any ideas?
TIA
 
oops, one more thing - I'm using the textbox in Excel 2K
 
Try
ActiveSheet.DrawingObjects("Text Box 1").Value = pstrLongString
 
Oops. I missread your problem. If you're trying to retrieve text and the cell has more than 1024 characters in it, then you would want to use the .value instead of .text. With .value you could retieve up to 32,767 characters.

I think you just need to set the multiline property to true.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top