Dim vwSingle As ViewSingle
Dim vwSingles As ViewsSingle
Dim prj As Project
Set prj = ActiveProject
Set vwSingles = prj.ViewsSingle
For Each vwSingle In vwSingles
I just incorporated your suggestion and I have good news and some bad news. The good news I didn't get the error message. The bad news I still get a '1101' error but this time it states "The argument value is not valid".
What I find interesting is that the error only seems to occurs for a Network Diagram view, but none of the other views that allow filters.
Jan I still need to confirm it for other view types, but the network diagram view's data that causes the error has a filter that is defined in Global..mpt. I also looked at the help for the
Filter Object and it states that Name is the default Property returned for the object. Any other thoughts are appreicated.
Can you be a bit more specific. It seems to work fine for me.
I applied a simple filter to a test file consisting of a summary line and four tasks. The filter looks for Flag1. One task has the flag set so the Gantt and Network Diagram both display just that task. I ran the following macro based on your code.
Thank you for your thoughts on the possible cause of the problem.
As I stated in a previous reply to Jan, the filter is located in the Global.mpt which I just confirmed as the cause of the error. I just added the same Filter to a Gannt Chart that is used by the Network Diagram and obtained the same error result.
Apparently I've fallen victim to a case of "NOT WYSIWYG".
I'm a little confused. Is your problem solved or are you saying you still have the error ("...obtained the same error result")? If your question has been answered, then please mark it as so. If your problem still exists please elaborate so we can help