取得 TableFields 集合,代表表格中的欄位。 唯讀 TableFields 。
語法
expression。 TableFields
詞 一個代表 Table 物件的變數。
範例
下列範例會變更項目表格中欄的對齊方式。 巨集會要求使用者輸入,以指出使用者想要哪一欄置中對齊,然後變更顯示並更新檢視。
Sub AutoWrap()
Dim fieldNumber As Integer
fieldNumber = InputBox$(Prompt:="Enter the number of the " _
& "column you want to center in the Entry table." _
& Chr(13) & "For example, Column 1 is the Indicators " _
& "column.")
ActiveProject.TaskTables("Entry").TableFields(fieldNumber _
+ 1).AlignData = pjCenter
TableApply Name:="&Entry"
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。