Using a macro to create a shortcut button to apply a resource flit

B

Blue Giraffe

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.
 
B

Blue Giraffe

It's okay, I've solved it. Mega simple, you just have to create new filters,
and use them in your macros.
 
P

Peter Rooney

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
 

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