Microsoft KB Archive/159795

= TMGR: OLE Automation Error Accessing Tasks Collection =

Article ID: 159795

Article Last Modified on 8/17/2005

-

APPLIES TO


 * Microsoft Team Manager 1.0 Standard Edition

-



This article was previously published under Q159795



SYMPTOMS
When using OLE Automation with Microsoft Team Manager, you may receive the following error message:

Run-time error '424':

Object required



CAUSE
You receive this error when using OLE Automation with a Team Manager team file if you try to access a task in the Window.CurrentView.Selection.Tasks collection while the team file has a grouping.

This would most effectively be used in a For - Each loop such as the following: For Each oTask In oTm.Window.CurrentView.Selection.Tasks MsgBox oTask.TaskName Next oTask



WORKAROUND
Use the following code to turn off the current grouping in the team file just before using the collection above: oTm.Window.CurrentView.RemoveGroupBy



MORE INFORMATION
When a team file is grouped by any field, any single task can be repeated in many different groups, depending on the grouping. Because of this, the Tasks collection does not return any tasks because the view can contain duplicates. When trying to access information on a task in the collection, the error will occur.

Additional query words: 1.0 1.00

Keywords: kberrmsg KB159795

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.