This property returns and sets a value that determines the alignment of the text in an intrinsic control.
control.Alignment [= number]
Constant |
Setting |
Description |
vbLeftJustify | 0 (default) | Text is left-aligned; control is right-aligned. |
vbRightJustify | 1 | Text is right-aligned; control is left-aligned. |
The following table shows the settings for number for the Label and TextBox controls.
Constant |
Setting |
Description |
vbLeftJustify | 0 (default) | Text is left-aligned. |
vbRightJustify | 1 | Text is right-aligned. |
vbCenter | 2 | Text is centered. |
The Alignment property is read-only for the CheckBox, OptionButton, and TextBox controls. If the MultiLine property setting of a TextBox control is False, text is always left-aligned.