Filter the deliverables by date

M

Majid

At present, I have deliverables that can be filtered by this week, next week,
this month and so on.
Would that be possible to set up the filter that uses from the current
calender date. For example if today is Feb 28 and I filter by "this month"
I would like to see all deliverables for one month starting today not just
the deliverables for the remining of the month which is Feb. 28 in this case.
I hope there is a solution to this.
Regards,
Majid
 
R

Rod Gill

Hi,

A simple VBA macro to recreate next 30 days filter. Try adding the following
to a new module:

Sub Next30Days()
Dim D As Date
FilterEdit Name:="Next30Days", TaskFilter:=True, Create:=True,
OverwriteExisting:=True, FieldName:="Start", Test:="is less than or equal
to", _
Value:=Format$(DateAdd("d", 30, Date)), ShowInMenu:=True,
ShowSummaryTasks:=True
FilterEdit Name:="Next30Days", TaskFilter:=True, FieldName:="",
NewFieldName:="Finish", Test:="is greater than or equal to", _
Value:=Format$(Date, "Short Date"), Operation:="And",
ShowSummaryTasks:=True
FilterApply Name:="Next30Days"
End Sub

Create a new Icon on a toolbar to run teh macro or press Alt+F8 and run teh
Next30Days macro to re-create the filter
 
M

Majid

Thank you Rod. I have pasted it already but I have complie error:syntex error
Please advise Thank you
 

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