Checking to see which view is current

P

Peter Rooney

I have some macros which remove filtering from either the Gantt view or the
Resource Usage view thus:

FilterApply "All Tasks"
FilterApply Name:="&All Resources"

However, I would like to check which view is current befor either is run, to
prevent display of an error message to say that I'm trying to apply a
nonexistent filter.

Can anyone help?

Cheers

Pete
 
J

Jan De Messemaeker

Hi Peter,

Loop through TaskViewList to see whether CurrentView is part of that list.
HTH
 
J

John

Peter Rooney said:
I have some macros which remove filtering from either the Gantt view or the
Resource Usage view thus:

FilterApply "All Tasks"
FilterApply Name:="&All Resources"

However, I would like to check which view is current befor either is run, to
prevent display of an error message to say that I'm trying to apply a
nonexistent filter.

Can anyone help?

Cheers

Pete

Pete,
Try using
ActiveProject.CurrentView

Hope this helps.
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