"Record a Macro" Inconsistent Results

B

BillV

I've run into a problem that I believe may be a Project 2007 Pro bug. I
wanted to do a simple repeatative copy and paste using the "record a macro"
function. It turns out the macro will run once correctly, when I run it
again it enters zeros in the next row. I made sure to be very careful during
the recording process not to make any errant clicks etc. I am wondering if
my "absolute" and "relative" settings are correct. To make a long story
short: I am copying estimated dates to summary tasks under a column that is
designated as a subtask, a little unusual but, I do not see where the macro
would not work. The macro only copies to one row (subtask) at a time.
 
D

Dean C

Try testing for Summary equals yes then copy the data you want until summary
equals no, then use SetTaskField to populate the sub tasks with the value
copied from the summary. The code below is untested.

for each mytask in activeproject.tasks
if mytask.summary = True then
myval = mytask.[fieldname]
else
SetTaskField Field:=[fieldname], value:=myval, TaskID:=myval.id
endif
next mytask
 
D

Dean C

After rereading your problem, I may have given you the reverse of what you
wanted. If you want the Summary task to show the earliest estimated start and
the latest estimated finish, customize the field to rollup min or max to the
summary task.
 

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