Customized TaskField "View"

S

Steve

I am trying to write a program that will display a different group of Task
Fields (% Complete, Work, Cost, etc.) depending on the selection from a drop
down combo box. I am using Project 2007 with SP2 installed.

Initially, I thought I could just count the number of columns and delete
them then add the new ones. But this doesn't work because Project returns an
error message if you try to have less than 1 viewable column.

Dim Count as Long

Count = ActiveProject.TaskTables(ActiveProject.CurrentTable).TableFields.Count

Do Until Count < 1
ColumnDelete
Count = Count -1
Next

So what I want to do now is delete all the columns except for Name because
that is the one Field that I use in each view, but I can't seem to come up
with a way to locate the name of the Field.
 
J

Jack Dahlgren MVP

If the different groups of task fields are known in advance, you could
simply predefine the table and view.
Then the user only needs to select the view and it will all be there - and
formatted with column widths and appropriate barstyles.

You know that they can just right click a column header and insert any
column at any time right?

-Jack
 

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