Filter out those future tasks and code "4" in the number2 field

M

Mike H Le

I have tried playing around with this code, but cannot get
it to work.
1. Filter out those future tasks (task will start
next month), and code "4" in the number2 field.
2. Filter out next week tasks (tasks start or finish
next week), and code "3" in the number2 field.
3. Filter out in-progress tasks (between 1% to 99%),
and code "2" in the number2 field.
4. Filter out this week tasks (tasks start or finish
this week), and code "1" in the number2 field
5. Group number2 field.
If you have some similar code, Please help. Thanks

Mike H Le
 
M

Mike h Le

Jack:
How cone the below macro does not code 4 to field
number2? Thanks you very much.

Sub Macro1()
' Macro Macro1
' Macro Recorded 7/3/03 by Mike H Le.
'your first condition priority 4
FilterEdit Name:="Filter 2", TaskFilter:=True,
Create:=True, OverwriteExisting:=True,
FieldName:="Flag20", Test:="equals", Value:="no",
ShowInMenu:=False, ShowSummaryTasks:=False
FilterEdit Name:="Filter 2", TaskFilter:=True,
FieldName:="", NewFieldName:="Start", Test:="is greater
than", Value:="""Show tasks that should have started
AFTER:""?", Operation:="And", ShowSummaryTasks:=False
FilterEdit Name:="Filter 2", TaskFilter:=True,
FieldName:="", NewFieldName:="Finish", Test:="is less
than", Value:="""Show tasks that should have finish
earlier:""?", Operation:="And", ShowSummaryTasks:=False
FilterApply Name:="Filter 2"
FilterEdit Name:="Filter 2", TaskFilter:=True,
FieldName:="", NewFieldName:="Number2", Test:="equals",
Value:="4", Operation:="And", ShowSummaryTasks:=False
End Sub
 
J

Jack D.

Mike said:
Jack:
How cone the below macro does not code 4 to field
number2? Thanks you very much.

Sub Macro1()
' Macro Macro1
' Macro Recorded 7/3/03 by Mike H Le.
'your first condition priority 4
FilterEdit Name:="Filter 2", TaskFilter:=True,
Create:=True, OverwriteExisting:=True,
FieldName:="Flag20", Test:="equals", Value:="no",
ShowInMenu:=False, ShowSummaryTasks:=False
FilterEdit Name:="Filter 2", TaskFilter:=True,
FieldName:="", NewFieldName:="Start", Test:="is greater
than", Value:="""Show tasks that should have started
AFTER:""?", Operation:="And", ShowSummaryTasks:=False
FilterEdit Name:="Filter 2", TaskFilter:=True,
FieldName:="", NewFieldName:="Finish", Test:="is less
than", Value:="""Show tasks that should have finish
earlier:""?", Operation:="And", ShowSummaryTasks:=False
FilterApply Name:="Filter 2"
FilterEdit Name:="Filter 2", TaskFilter:=True,
FieldName:="", NewFieldName:="Number2", Test:="equals",
Value:="4", Operation:="And", ShowSummaryTasks:=False
End Sub

Sorry Mike,

I don't have time to look at this and give you an answer until next week. It
is a holiday here.
My advice is to start small and keep adding on until it breaks, then you
will know what is wrong.

-Jack

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently. For Macros and other things check http://masamiki.com/project

-Jack Dahlgren, Project MVP


+++++++++++++++++++
 

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