PDA

View Full Version : Create a filter and add Active=Yes as test criteria using VBA macro



vwbugluvr
07-18-2017, 07:42 AM
Greetings,

I have created a macro to update my reporting filters using the current date. This is a code snippet:


' Set the filter to tasks that should have finished by now
FilterEdit Name:="_Tasks Not Finished", _
TaskFilter:=True, Create:=True, OverwriteExisting:=True, _
FieldName:="Finish", Test:="is less than or equal to", Value:=Now(), _
FieldName:="% Complete", Test:="does not equal", Value:=100, _
FieldName:="Active", Test:="equals", Value:="Yes", _
ShowInMenu:=True

My problem is that the Active test is not working. When I run the macro and apply the filter, I receive all tasks meeting the date criteria on all tasks, inactive tasks included. Am I applying to wrong code test or type for Active?

I have searched Bing, Google, and every MS Project thread on this site but found no solution.

Thank you.