RE: Using a macro to create a shortcut button to apply a resource flit by PeterRooney
PeterRooney
Fri Jan 28 07:55:04 CST 2005
Hello, Blue!
You can't always record your filtering - it's better to record yourself
creating and applying a filter, then you can use the code you get to create
filters for other resources, too.
Remember to use the test "contains" and not "equals", to pick up where a
task is allocated to more than one resource.
Hope this helps
Pete
Sub FilterDaveChow()
FilterEdit Name:="Dave Chow", TaskFilter:=True, _
Create:=True, OverwriteExisting:=True, FieldName:="Resource Names",
Test:="contains", _
Value:="Dave Chow", ShowInMenu:=False, ShowSummaryTasks:=True
FilterApply Name:="Dave Chow"
End Sub
"Blue Giraffe" wrote:
> I want to create a shortcut button on a toolbar which instantly applies a
> resource filter. Macros I have recorded so far have been recorded to go
> through the whole process of applying the filter to show only tasks using one
> resource, selecting the resource from the drop-down in the options box, and
> clicking ok. However, when the macro is run, it only goes as far as the
> options box, leaving the drop-down field blank.