Loop to see only tasks in a filter? 
Author Message
 Loop to see only tasks in a filter?

I am trying to create some Project 2000 VBA code that will
loop through tasks in a filter and place particular values
into Excel.

I have the Excel piece working (for the most part - it
doesn't seem to like the template part of the .Add, but I
can get a blank worksheet up and manipulate it).

What I can't do is apply a filter in project and then only
refer to the tasks in that filter.  I can only see to
figure out how to identify the activeproject.tasks
collection.  Is there no way to specify the collection of
tasks that result from a filter?

Thanks for any help. Steve



Thu, 14 Jul 2005 23:17:15 GMT  
 Loop to see only tasks in a filter?
Hi Steve,

There are two ways about this.

What first comes to mind, is forget about the filter, in the Tasks
collection evaluate the filter condition, and only handle Excel if the
filter condition is met.

The second way is as follows:

View Apply ........ (the view that is to be filtered)
FilterApply .......
Select all
for each anytask in activeselection.tasks

Next anytask

HTH

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620


Quote:
> I am trying to create some Project 2000 VBA code that will
> loop through tasks in a filter and place particular values
> into Excel.

> I have the Excel piece working (for the most part - it
> doesn't seem to like the template part of the .Add, but I
> can get a blank worksheet up and manipulate it).

> What I can't do is apply a filter in project and then only
> refer to the tasks in that filter.  I can only see to
> figure out how to identify the activeproject.tasks
> collection.  Is there no way to specify the collection of
> tasks that result from a filter?

> Thanks for any help. Steve



Thu, 14 Jul 2005 23:48:38 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Task not seeing SC_SCREENSAVE message

2. Application seen in Task Manager but no display!

3. Application seen at Task Manager but no display from application

4. Looping through filtered data only

5. Filter the aktuell Task via VB

6. Customize views and filters in Tasks page

7. Number of visible tasks when filter

8. Number of visible tasks with a filter

9. filter for tomorrow's tasks

10. OLEDB Access: Filtering tasks by date

11. How to test if a filter returns no tasks

12. Program to roll up only filtered tasks

 

 
Powered by phpBB® Forum Software