April 2006
Beginner
1114 pages
98h 16m
English
shape.TextFrame
For autoshapes, returns the TextFrame object used to set and format text appearing on the shape. Causes an error for most other shape types. The following code draws an oval and adds some text to it:
Sub DrawOval( )
Dim ws As Worksheet, s As Shape
Set ws = ActiveSheet
' Draw a shape
Set s = ws.Shapes.AddShape(msoShapeOval, 60, 30, 1, 1)
' Add text.
s.TextFrame.Characters.text = "Vigorous writing is concise."
' Resize shape to fit text.
s.TextFrame.AutoSize = True
End SubRead now
Unlock full access