Accessing MS Project from Excel

L

luvgreen

Greetings!

I need to access MS Project from excel. I need to filter all tasks in Project and then filter on critical tasks. I used the following codes. Sometimes it filters on critical, sometime it doesn't. How to make it work consistently? Your help is greatly appreciated.

'Show all data
FilterApply Name:="&All Tasks"

'Filter for critical Yes
FilterApply Name:="&Critical"
 
Top