Reference > Caption Object > Caption Object Properties > Text Property (Caption) |
Text Property (Caption)
Sets/returns the text to display as a caption.
object.Text= string
Read/Write at run time and design time.
Caption is the default.
The Text property allows you to set character codes such as vbCr (Chr(13)), vbLf (Chr(10)), vbCrLf (Chr(13)+Chr(10)) within the text string at run time. For example:
With TDBDate.Caption
.Text = "Start Date:" & vbCr & "End Date:"
End With
This is the default property of the Caption object.
The horizontal and the vertical text alignment can be specified with the AlignHorizontal and AlignVertical properties.
See Also