Share via


Table.TableFields Property

Project Developer Reference

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

Syntax

expression.TableFields

expression   A variable that represents a Table object.

Return Value
TableFields

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.

Visual Basic for Applications
  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

See Also