R
Ronald Dodge
I have my code filtering the tasks for those that are incomplete. Here
lately, there has been few mini schedules that has had all of their projects
completed, but yet, not unlinked, so when the program filters for incomplete
tasks, not a single task is returned (as expected). The code will then
select the sheet, then try to copy the sheet, and it errors out cause
there's not a single task in the list. To get around the error, I have
tried the following code, but to no avail, it didn't do the trick as I still
get the error message.
MSProj.FilterApply Name:="All Incomplete"
MSProj.SelectSheet
If MSProj.ActiveSelection.Tasks.Count > 0 Then
MSProj.EditCopy
FilterAllTasks = 1
Else
FilterAllTasks = 2
End If
The above code is inside of a function and the MSProj is the application
object since it's actually ran from an Excel VBA.
NOTE: I have a basic understanding of MS Project in regards to how it works
on the user side and I have a pretty good understanding of how VBA works, I
just may not know the specific objects/properties from the code side of MS
Project that would work best.
lately, there has been few mini schedules that has had all of their projects
completed, but yet, not unlinked, so when the program filters for incomplete
tasks, not a single task is returned (as expected). The code will then
select the sheet, then try to copy the sheet, and it errors out cause
there's not a single task in the list. To get around the error, I have
tried the following code, but to no avail, it didn't do the trick as I still
get the error message.
MSProj.FilterApply Name:="All Incomplete"
MSProj.SelectSheet
If MSProj.ActiveSelection.Tasks.Count > 0 Then
MSProj.EditCopy
FilterAllTasks = 1
Else
FilterAllTasks = 2
End If
The above code is inside of a function and the MSProj is the application
object since it's actually ran from an Excel VBA.
NOTE: I have a basic understanding of MS Project in regards to how it works
on the user side and I have a pretty good understanding of how VBA works, I
just may not know the specific objects/properties from the code side of MS
Project that would work best.