Custom field
-
Wednesday, July 04, 2012 9:15 PM
Hi everyone.
Can any one tell me what's wrong with this?
FilePageSetupHeader Alignment:=pjRight, Text:="Duration: " & _
ActiveProject.Tasks(1).GetField(Application.FieldNameToFieldConstant("Text5", pjTask))
Thank you.
Manuela Mendes
- Edited by MMendesF Wednesday, July 04, 2012 9:16 PM
All Replies
-
Thursday, July 05, 2012 3:08 AMModerator
Nothing is wrong with it assuming the duration value you want to show up in the header of a gantt chart view is supposed to be taken from the text5 field of the first task in the project.
I dont get any error when running this code. Are you getting an error?
Brian Kennemer - Project MVP
DeltaBahn Senior Architect
endlessly obsessing about Project Server…so that you don’t have to.
Blog | Twitter | LinkedIn
- Edited by Brian Kennemer, MVPMVP, Moderator Thursday, July 05, 2012 4:15 PM
-
Thursday, July 05, 2012 8:42 PM
Right!
The problem was I was trying executing it inside VBA...
Thank you!
Manuela Mendes
-
Thursday, July 05, 2012 8:43 PMModeratorWhat error are you getting when you run it? I ran the code you posted and got no error. It worked completely as expected. It placed the value of text5 for Task(1) on the header.
Brian Kennemer - Project MVP
DeltaBahn Senior Architect
endlessly obsessing about Project Server…so that you don’t have to.
Blog | Twitter | LinkedIn -
Friday, July 06, 2012 1:53 AMModerator
Make sure Task 1 is a valid task and not blank.Rod Gill
The one and only Project VBA Book
Rod Gill Project Management
- Proposed As Answer by Amit Khare - Project Management Consultant Wednesday, July 11, 2012 4:55 AM
-
Tuesday, July 10, 2012 7:57 PM
Exactly!
Thank you all!
Manuela Mendes