E
Esperanza
Hello, I had a question that Im not too sure on how complicated it is.
I have modified the timesheet macro and this is the code I have:
'export informatin to excel
For Each R In Proj.Resources
xlR.Range("B1") = R.Name
xlR.Range("B1").Font.Bold = True
xlR.Range("B1").Font.ColorIndex = 3
Set xlR = xlR.Offset(1, 0)
'Export Assignment details
For Each A In R.Assignments
'filter assignments that are not complete and scheduled to
start within the next two weeks
If A.RemainingWork <> 0 Then
If A.Start <= (Proj.StatusDate + 14) Then
If A.TaskSummaryName <> currentsummary Then
xlR.Range("B1") = A.TaskSummaryName
xlR.Range("B1").Font.Bold = True
Set xlR = xlR.Offset(1, 0)
End If
currentsummary = A.TaskSummaryName
xlR.Range("a1:K1") = Array(A.TaskID, A.TaskName,
Format(A.ActualStart, "Short Date"), , Format(A.RemainingWork /
divideby, "0.0"), A.ActualFinish, , Format(A.Start, "Short Date"),
Format(A.Finish, "Short Date"), Format(A.Work / divideby, "0.0"),
Format(A.ActualWork / divideby, "0.0"))
Set xlR = xlR.Offset(1, 0)
End If
End If
Next
Set xlR = xlR.Offset(1, 0)
currentsummary = ""
This code will export to Excel all work that is not yet completed and
work that will start in the next two weeks. You can see that for each
assignment I have A.TaskSummaryName. The problem is that I want this
level of the summary and also the summary of the next level above
this. For instance I could have
1. Steps to do so and so (summary)
2. substeps to do...(summary)
3. detailed tasks (task)
So with what I have I can get 2 and 3 but i want to be able to get to
1. I hope I have not made this confusing. Thanks for any help on this.
I have modified the timesheet macro and this is the code I have:
'export informatin to excel
For Each R In Proj.Resources
xlR.Range("B1") = R.Name
xlR.Range("B1").Font.Bold = True
xlR.Range("B1").Font.ColorIndex = 3
Set xlR = xlR.Offset(1, 0)
'Export Assignment details
For Each A In R.Assignments
'filter assignments that are not complete and scheduled to
start within the next two weeks
If A.RemainingWork <> 0 Then
If A.Start <= (Proj.StatusDate + 14) Then
If A.TaskSummaryName <> currentsummary Then
xlR.Range("B1") = A.TaskSummaryName
xlR.Range("B1").Font.Bold = True
Set xlR = xlR.Offset(1, 0)
End If
currentsummary = A.TaskSummaryName
xlR.Range("a1:K1") = Array(A.TaskID, A.TaskName,
Format(A.ActualStart, "Short Date"), , Format(A.RemainingWork /
divideby, "0.0"), A.ActualFinish, , Format(A.Start, "Short Date"),
Format(A.Finish, "Short Date"), Format(A.Work / divideby, "0.0"),
Format(A.ActualWork / divideby, "0.0"))
Set xlR = xlR.Offset(1, 0)
End If
End If
Next
Set xlR = xlR.Offset(1, 0)
currentsummary = ""
This code will export to Excel all work that is not yet completed and
work that will start in the next two weeks. You can see that for each
assignment I have A.TaskSummaryName. The problem is that I want this
level of the summary and also the summary of the next level above
this. For instance I could have
1. Steps to do so and so (summary)
2. substeps to do...(summary)
3. detailed tasks (task)
So with what I have I can get 2 and 3 but i want to be able to get to
1. I hope I have not made this confusing. Thanks for any help on this.