Filtering in Resource Usage view

P

Peter Rooney

Does anybody out there have the appropriate VBA to use when I want to filter
the Resource Usage view to a particular team member?

I tried to create a filter in RU view (which might make this a question for
the General project Forum, as against this one..!), but in the filter dialog
box, I couldn't find the "Resource Names" field listed.

Ideally, I'd like to know what I was doing wrong in creating the filter, but
failing that, could anyone tell me how to filter the view to a named resource
in VBA instead? The object of the exercise is to write a routine that filters
to Resource 1, prints, filters to resource 2, prints, and so on, producing a
set of resourcing prints for all members of a team.

Cheers and thanks in advance

Pete
 
J

JulieS

Hi Peter,

I can't help you with the VBA part but I can offer a small piece of
information that may help you along. In the Resource Usage View the field
that contains the name of the resource is the [Name] field, not the Resource
Name field.

Hope this helps out somewhat.

Julie
 
J

John

JulieS said:
Hi Peter,

I can't help you with the VBA part but I can offer a small piece of
information that may help you along. In the Resource Usage View the field
that contains the name of the resource is the [Name] field, not the Resource
Name field.

Hope this helps out somewhat.

Julie

Pete/Julie,
Here is the VBA routine that should do what you need. You can look up
the syntax for the Print Method and add optional arguments as needed.

Sub ResPrint()
For Each R In ActiveProject.Resources
If Not R Is Nothing Then
FilterEdit Name:="ResPrint", Taskfilter:=False, create:=True, _
Overwriteexisting:=True, FieldName:="name",
Test:="contains", _
Value:=R.Name, showinmenu:=False, showsummarytasks:=False
FilterApply Name:="ResPrint"
OutlineHideSubTasks
OutlineShowSubTasks
FilePrint
End If
Next R
End Sub

John
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