View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Kalinowski Jim Kalinowski is offline
external usenet poster
 
Posts: 1
Default how to extract text from a TextBox

Hi

I'm using the following code to extract text from a TextBox

Function getTextBoxContents(text_box_name As String, sheet_name As String) As Strin

Dim i As Intege

For i = 1 To Sheets(sheet_name).Shapes.Coun

Dim text_box As Shap
Set text_box = Sheets(sheet_name).Shapes.Item(i

Dim text_frame As TextFram
Set text_frame = text_box.TextFram

If text_frame.Parent.name = text_box_name The
getTextBoxContents = text_frame.Characters.Tex
Exit Fo
End I

Next

End Functio

I pass the function the name of the text box and the name of the sheet it's on, and I get back the text. The problem is, I only get the first 255 characters

Does anybody know how to get more then 255 characters from a TextBox

Thanks
Jim