PDA

View Full Version : MS Project VBA - How to find only the tasks in a filter



KeithRoberts
10-02-2008, 03:54 PM
I need to be able to find tasks that are only visible after a filter has been applied in MS Project VBA. I have tried using ActiveSelection, but that does not work. I do not want to have to set a flag based on the filter criteria, but so far, that is the only method that I can find.

How do you determine if a task is appearing in a filter or not? If it was in Excel, I could use Visible. But no such property exists in MS Project.

Any help help will be greatly appreciated. :banghead:

onetruerick
11-27-2008, 08:29 PM
I do this all the time using ActiveSelection. After you set the filter, use SelectSheet, then you can use something like

For Each t in ActiveSelection.Tasks

This pretty much always works for me. What happens when you try it?