PRJ98: Method Does Not Create Cross-Project Links

ID: Q192025

The information in this article applies to:

SYMPTOMS

In Microsoft Project 98, when you run a Microsoft Visual Basic for Applications Sub procedure (or macro) to create cross-project links using either the LinkPredecessors method or the LinkSuccessors method, the method does not create cross-project links. Instead, it creates links within the source project.

WORKAROUND

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft Support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

   http://www.microsoft.com/support/supportnet/refguide/default.asp

To work around this behavior, use the Predecessors or Successors property.

For example, to create a cross-project link between the first task of the active project and the first task of a project named Project2, use the following line of code:

ActiveProject.Tasks(1).Predecessors = "Project2\1"

 -or-

If a predecessor/successor relationship already exists for a task and you need to create an additional link, use the following line of code:

ActiveProject.Tasks(1).Predecessors = ActiveProject.Tasks(1).Predecessors & "," & "Project2\1"

STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Project listed at the beginning of this article.

Additional query words: cross project

Keywords          : kbdta kbdtacode PROJVBA projwin 
Version           : WINDOWS:98
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbpending

Last Reviewed: May 18, 1999