对齐控件文本Align text in a control

  1. 在“属性”窗口中,选择“TextAlign”属性。In the Properties window, choose the TextAlign property.

  2. 单击属性值旁边的下拉箭头来显示可用选项列表。Click the drop-down arrow next to the property's value to display a list of available choices.

  3. 选择以下项之一:Choose one of the following:

    • 左对齐,将文本与控件的左边缘对齐。Left, to align the text with the left edge of the control.

    • 右对齐,将文本与控件的右边缘对齐。Right, to align the text with the right edge of the control.

    • 居中对齐,将文本相对控件长度居中。Center, to center the text relative to the length of the control.

TextAlign 适用于**组合框标签** 和**文本框**。TextAlign is available for a ComboBox, Label, and TextBox.

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.