R
ronmcfarlane
I have defined a filter "Tasks due by..." as
Fieldname Test Values
%Complete does not equal 100% and
Summary equals No and
Start <= "Enter the report end date:"? and
Resource Name equals "Enter the Resource:"?
When I apply the filter through the list of Project>Filter for>Task due
by... everything works fine.
If however I try and use it in VBA It returns No tasks. The code is as
follows
Sub Tracking_Report()
Dim R As Resource
Dim Report_End As String
ViewApply Name:="Detail Gantt"
TableApply Name:="Task Tracking"
Report_End = InputBox$("Enter the Report End Date:")
'Loop for each Resource
For Each R In ActiveProject.Resources
FilterApply Name:="Tasks due by...", Highlight:=False,
Value1:=Report_End, Value2:=R.Name
....... logic to print a report
Next R
End Sub
The values for Report_End and R.Name look correct. If I remove the name
part and only filter on dates it works fine.
Also after applying the filter how can I determine a count of tasks so
that I can not print an empty report.
Thanks in advance
Ron
Fieldname Test Values
%Complete does not equal 100% and
Summary equals No and
Start <= "Enter the report end date:"? and
Resource Name equals "Enter the Resource:"?
When I apply the filter through the list of Project>Filter for>Task due
by... everything works fine.
If however I try and use it in VBA It returns No tasks. The code is as
follows
Sub Tracking_Report()
Dim R As Resource
Dim Report_End As String
ViewApply Name:="Detail Gantt"
TableApply Name:="Task Tracking"
Report_End = InputBox$("Enter the Report End Date:")
'Loop for each Resource
For Each R In ActiveProject.Resources
FilterApply Name:="Tasks due by...", Highlight:=False,
Value1:=Report_End, Value2:=R.Name
....... logic to print a report
Next R
End Sub
The values for Report_End and R.Name look correct. If I remove the name
part and only filter on dates it works fine.
Also after applying the filter how can I determine a count of tasks so
that I can not print an empty report.
Thanks in advance
Ron