kevindmorgan
IS-IT--Management
I have a macro that creates a custom filter then executes the filter. It works fine if I put specific dates in the Value:="HELP" field.
I want to use variables instead of specific dates and base them from "today". I can use "today" in the first field, but I want the second date to be a date in the future. I have tried "today (+30)" but it treats that as the 30th of the current month.
Here is the part of the macro that creates the filter. I need to know how I can use a variable where HELP is used here.
Sub SixtyDay()
FilterEdit Name:="60 Day", TaskFilter:=True, _
create:=True, overwriteexisting:=True, _
FieldName:="Finish", test:="gtr or equal", _
Value:="HELP", Operation:="and", _
ShowInMenu:=True
FilterEdit Name:="60 Day", TaskFilter:=True, _
create:=False, overwriteexisting:=False, _
newfieldname:="id", test:="less or equal", _
Value:="HELP"
----truncated-----
End Sub
I want to use variables instead of specific dates and base them from "today". I can use "today" in the first field, but I want the second date to be a date in the future. I have tried "today (+30)" but it treats that as the 30th of the current month.
Here is the part of the macro that creates the filter. I need to know how I can use a variable where HELP is used here.
Sub SixtyDay()
FilterEdit Name:="60 Day", TaskFilter:=True, _
create:=True, overwriteexisting:=True, _
FieldName:="Finish", test:="gtr or equal", _
Value:="HELP", Operation:="and", _
ShowInMenu:=True
FilterEdit Name:="60 Day", TaskFilter:=True, _
create:=False, overwriteexisting:=False, _
newfieldname:="id", test:="less or equal", _
Value:="HELP"
----truncated-----
End Sub