How to list all the fields displayed in a Project table

J

Jan De Messemaeker

Hi,

IT was indeed quite a bit of research to put it right.
Here's your starting point:

Sub Fieldlist()
Dim TB As Table
dim CTR as integer
For Each TB In ActiveProject.TaskTables
If TB.Name = ActiveProject.CurrentTable Then
Exit For
End If
Next
For Ctr = 1 To TB.TableFields.Count
Debug.Print FieldConstantToFieldName(TB.TableFields(Ctr).Field)
Next Ctr
End Sub

Greetings,

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 
R

Robert

Thanks a lot Jan !!!
That works fine !


Jan De Messemaeker said:
Hi,

IT was indeed quite a bit of research to put it right.
Here's your starting point:

Sub Fieldlist()
Dim TB As Table
dim CTR as integer
For Each TB In ActiveProject.TaskTables
If TB.Name = ActiveProject.CurrentTable Then
Exit For
End If
Next
For Ctr = 1 To TB.TableFields.Count
Debug.Print FieldConstantToFieldName(TB.TableFields(Ctr).Field)
Next Ctr
End Sub

Greetings,

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top