ComboBox.TextAlign 屬性 (Access)ComboBox.TextAlign property (Access)

TextAlign 屬性會指定新控制項中的文字對齊方式。The TextAlign property specifies the text alignment in new controls. 可讀寫的 ByteRead/write Byte.



_運算式_代表**ComboBox** 物件的變數。expression A variable that represents a ComboBox object.


TextAlign 屬性使用下列設定值。The TextAlign property uses the following settings.

設定Setting Visual BasicVisual Basic 描述Description
一般General 00 (預設值) 文字靠左對齊;數字與日期靠右對齊。(Default) The text aligns to the left; numbers and dates align to the right.
Left 11 文字、數字及日期均靠左對齊。The text, numbers, and dates align to the left.
置中Center 22 文字、數字及日期均置中對齊。The text, numbers, and dates are centered.
Right 33 文字、數字及日期均靠右對齊。The text, numbers, and dates align to the right.
平均Distribute 44 文字、數字及日期平均分散對齊。The text, numbers, and dates are evenly distributed.

您可以在 Visual Basic 使用控制項的預設控制項樣式或**DefaultControl** 屬性來設定TextAlign屬性的預設值。You can set the default for the TextAlign property by using a control's default control style or the DefaultControl property in Visual Basic.


下列範例會將向右供應商] 表單上的 [位址] 文字方塊中的文字對齊。The following example aligns the text in the Address text box on the Suppliers form to the right.

Forms("Suppliers").Controls("Address").TextAlign = 3

支援和意見反應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.