Thread: Rectangle Size
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Rectangle Size

You can use Characters' Start and Length parameters.

Try this...

Option Explicit
Public Sub test()
Dim lnInitialCharCount As Long, k As Long
With ActiveSheet.Shapes("Rectangle 3")
lnInitialCharCount = .TextFrame.Characters.Count
Do While Len(Range("J17").Value) - (k * 255 - 254) 0
k = k + 1
..TextFrame.Characters(Start:=lnInitialCharCount + k * 255 - 254, _
Length:=255).Text = Mid(Range("J17").Value, k * 255 - 254, 255)
Loop
End With
End Sub

Ken Johnson