Programmaticaly enumerate filtered tasks ?

P

Patrice

I'm new to MSP and I create a macro that create and XML Spreadsheet...

I saw Filter.Apply but I don't see how I could enumerate filtered tasks. I
saw only the ThisProject.Tasks collection that enumerates all tasks.

Once a filter is applied how can I enumerate programmatically filtered tasks
?

TIA...
 
P

Patrice

Great, looks fine but still got a problem. If there is no tasks it looks
like ActiveSelection.Tasks.Count fails instead of returning 0. It looks like
also that ActiveSelection is defined.

How do I check for an empty selection ?

TIA and sorry but I'm really new to the MSP programming model though
experienced with VBA...
 
J

Jan De Messemaeker

Hi,

I's a trappable error, that's all I can say:

Sub Vide()
On Error GoTo hier
Debug.Print ActiveSelection.tasks.Count
Exit Sub
hier:
Debug.Print Err.Number
End Sub

This prints 424 whan the activeselection is empty.

Hope this helps,
 

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