MIlestones behaving badly on export using vba

J

Jeff

I am exporting data to excel and when my routine comes across a
milestone

For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
Set xlRow = xlRow.Offset(1, 0)
Set xlCol = xlRow.Offset(0, t.OutlineLevel)
xlCol = t.Name
If t.Summary Then
xlCol.Font.Bold = True
End If

It treats it as if it were a summary task and fails to import any of
the details associated with the task. To mak matters worse, if I
remove the designation of milestone from the task, it somehow retains
the property and it gets imported just like a summary task.

Does Project 2003 save this information someplace else. If so can I
get to it and change the flag?

Thanks
 
J

JackD

From posts in the project.vba group I think he is trying to export the
assignment data associated with the milestone. That would seem to explain
it.
 
J

John

I am exporting data to excel and when my routine comes across a
milestone

For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
Set xlRow = xlRow.Offset(1, 0)
Set xlCol = xlRow.Offset(0, t.OutlineLevel)
xlCol = t.Name
If t.Summary Then
xlCol.Font.Bold = True
End If

It treats it as if it were a summary task and fails to import any of
the details associated with the task. To mak matters worse, if I
remove the designation of milestone from the task, it somehow retains
the property and it gets imported just like a summary task.

Does Project 2003 save this information someplace else. If so can I
get to it and change the flag?

Thanks

Jeff,
Obviously there is more to your code then just the "For" loop you show.
I don't see anything obviously wrong with the code shown. I set up a
simple test file with a milestone and although I didn't use the exact
code shown, my code did not treat the milestone like a Summary line.
Something else must be going on in your file.

John
 

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