VBA reference to tasks currently displayed

F

franklin

What would be the VBA reference to only the tasks currently on display?
ActiveProject.Tasks returns all tasks, but I only want to report on the tasks
as filtered at the time of running the macro. (I'm putting together a
hierarchy export to Excel)

Thanks in advance!
 
J

John

franklin said:
What would be the VBA reference to only the tasks currently on display?
ActiveProject.Tasks returns all tasks, but I only want to report on the tasks
as filtered at the time of running the macro. (I'm putting together a
hierarchy export to Excel)

Thanks in advance!

franklin,
What you want is ActiveSelection.Tasks. But unless you are writing your
macro for the experience, fellow MVP, Jack Dahlgren already has a macro
to do exactly what you describe. To see it, go to Jack's website
at,http://masamiki.com/project/macros.htm, and look for his macro called
"Export hierarchy to Excel".

Hope this helps.
John
Project MVP
 
F

franklin

Ok, found reference to the ActiveSelection.Tasks function which works fine if
you highlight the current selection first. Ideal would be if there is a way
to work with the task currently on display (without first having to highlight
the tasks).
 
F

franklin

My bad ... just included a SelectSheet function in the macro and all works as
planned.
 

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