Share via


TableFields Property

Returns a TableFields collection representing the fields in a specified table. Read-only.

Example

The following code sample changes the alignment of a column in an entry table. The macro asks for input from the user to indicate which column the user wants to center, then changes the display and refreshes the view.

Sub AutoWrap()
   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

Applies to | Table Object, Tables Collection Object