Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Accessing Mutiple TextBoxes


Hi again,

just googled around and discovered that the TextBoxes from the drawin
Toolbar kann handle up to 32,767 Character in Excel 97 ... how com
only 255 were saved to the array when I ran your code Peter ?

Regards
Ti

--
TimBr
-----------------------------------------------------------------------
TimBro's Profile: http://www.excelforum.com/member.php...fo&userid=1491
View this thread: http://www.excelforum.com/showthread.php?threadid=26541

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Accessing Mutiple TextBoxes

For some odd reason, with strings over 255 in (drawing)
textboxes you need to read or write in chunks of up to
255, something like this:

Sub test3()
Dim str1 As String, str2 As String, shp As Shape
Dim j As Long, i as long

'manually create a textbox named "Text Box 3"
Set shp = ActiveSheet.Shapes("Text Box 3")

For j = 1 To 5
For i = 1 To 250
str1 = str1 & Chr(64 + j)
Next
str1 = str1 & vbLf & vbLf
Next
MsgBox Len(str1)
With shp
'write
j = 1

Do While j < Len(str1)
s = Mid(str1, j, 250)
.TextFrame.Characters(j).Insert String:=s
j = j + 250
Loop
MsgBox .TextFrame.Characters.Count

'read
j = 1
Do While j < .TextFrame.Characters.Count
str2 = str2 & .TextFrame.Characters(j, 250).Text
j = j + 250
MsgBox Len(str2)
Loop

End With
MsgBox Len(str2)
Debug.Print str2
End Sub

Regards,
Peter

-----Original Message-----

Hi again,

just googled around and discovered that the TextBoxes

from the drawing
Toolbar kann handle up to 32,767 Character in Excel

97 ... how come
only 255 were saved to the array when I ran your code

Peter ?

Regards
Tim


--
TimBro
----------------------------------------------------------

--------------
TimBro's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=14912
View this thread:

http://www.excelforum.com/showthread...hreadid=265419

.

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
Running mutiple excel sheets on mutiple computers Lost Excel Discussion (Misc queries) 3 January 16th 09 12:32 AM
tab between several textboxes Kim Excel Worksheet Functions 0 May 9th 05 04:08 PM
Accessing Mutiple TextBoxes TimBro[_2_] Excel Programming 0 October 1st 04 03:16 PM
Accessing Mutiple TextBoxes TimBro Excel Programming 1 October 1st 04 01:57 PM
Textboxes Marcotte A Excel Programming 2 July 7th 04 12:55 AM


All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"