Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Predecessors list abbreviated with "..." 1

Status
Not open for further replies.

medvito

Technical User
Dec 3, 2009
4
US
We are using MS Project 2003 (but this happens in 2007 also) and are using the master/consolidated project function. We have inserted about 13 sub projects and there are many (thousands) of links between the plans. Because we're linking between plans, the predecessors & sucessors fields show the path of the subproject being linked to/from. The plans reside on a shared drive on a server and so the paths are long. Therefore after 2-3 links on one task, the field doesn't show all of the predecessors (or sucessors), it just inserts a "..." for each additional link.

Has anyone ever experienced this before? Is there a way to avoid this? It's hard to see what's been linked with this abbreviation. I have used the links to other plans tool, but that can be time consuming to find the individual task in that screen. Also, I need them to show up on reports. I tried mapping a drive to the folder where the plans are, but Project still shows the entire path.

HELP!... Maria
 
I believe that MSPrj shows what it stores: the _fully_ qualified path to the filename.

I cannot think of any easy workaround -- based on the environment you describe -- for the display issue you have to deal with.

You could write a smattering of VBA to visit each task and get all the predecessors (and successors, too, I suppose) and build up a string that you stored in the Notes field. You would run this macro when you have the project opened (it's easy enough to hook it to the Project Open event). I expect, however, that you're already using the Notes field so this is not likely to be a worthwhile approach.

I will mull this over but I am not hopeful that I can come up with an easy-to-use approach.
 
I chatted with a friend about your issue. He suggested that you navigate as far down the folder structure as possible, RightMouseButton on the folder, select Share from the context menu and assign a short share name. If you've got your project files distributed across a bunch of folders then repeat the process until all paths have been assigned a short share name.

I don't have an environment where I can easily test this out. Give it a shot and report back. If it doesn't work out then some specifics might be useful: actual path names, actual displays, ... you know the drill: if you think it'll help, give us the info.
 
Thank you so much for taking the time to think about this issue. I really like the idea of assigning a short share name. I'll try that and report back. If that works, I think it could be THE answer! Thanks and I'll post back shortly.
 
Ok, so I tried to assign a short name to the folder and I don't seem to have the ability to do that or that function has been disabled. I'm working on a network where there are very tight controls over rights, etc. So that could be my issue, but I didn't even see the option for a "short name" and I looked in the folder properties dialog too. Any thoughts? I am familiar with recording macros and making minor tweaks to them, but I am not a VBA programmer. Is there something I can do maybe using VBA to "convert" that full path name to a drive letter? My big worry here is that I already have tons of links in the plan and so many of them are hidden with those "..." that I won't be able to find them with a find/replace kind of thing. Yeesh.

To provide you with more info, the path for the folders is:
\\MPTSNCLP04\Share\New York\FacilitiesEng\NDC Project Plan\Workstream Master\filename.mpp

Thanks for any thoughts...
 
Sounds like you're working in an environment that is as locked down as the one I'm in.

You are left with begging/pleading/grovelling with the appropriate staff in your systems group. If your situation is the same as mine then you will likely be rebuffed. If you *really* need this then try escalating the issue to your own manager and see if she has the "weight" to get the change implemented.

Incidentally, it's easy enough to create the problem -- even *without* a long path ... just have very long task names and use several of those as predecessors to a single task.

VBA code ... I'll post a code snippet later today or tomorrow. It will _help_ but not fully solve your problem. I'm a bit pressed for time right now so I'll have to ask you to be patient.
 
Took a little longer than I expected.

Code:
Option Explicit
Sub PDQBach()

Dim iLoop As Integer
Dim tsk As Task
Dim vAPreds As Variant
Dim vATemps As Variant

Dim strPred As String

For Each tsk In ActiveProject.Tasks
    'For demonstration purposes
    Debug.Print vbCrLf; ">>>>  Project:"; tsk.Project; _
                ", Task.ID:"; tsk.ID; " Task.Name '"; tsk.Name; "'"

    'Split the predecessors into an array.
    'Split takes place whereever there is a comma separator
    vAPreds = Split(tsk.Predecessors, ",")
    'vAPreds(0) has the 1st predecessor
    'vAPreds(1) has the 2nd predecessor
    'etc.
    
    'Process each item in the array of Predecessors
    For iLoop = 0 To UBound(vAPreds)
        'For demonstration purposes
        Debug.Print vbTab; vbTab; "Predecessor:  Task ";
        
        'Check each predecessor
        'If it is only a number then it's a task in the CURRENT project file
        'If it is anything else then it's a task in a DIFFERENT project file
        If IsNumeric(vAPreds(iLoop)) Then
            'This is a predecessor within the CURRENT project file
            strPred = vAPreds(iLoop)
            Debug.Print strPred; " in this project"
        Else
            'This is a predecessor in a DIFFERENT project file
            'Assume that vAPreds(iLoop) contains something like this:
            ' C:\abc\def\proj1.mpp\23
            '    path is:    c:\abc\def\
            '    proj is:    proj1.mpp
            '    pred task:  23
            
            'Split the predecessor string at each "\"
            vATemps = Split(vAPreds(iLoop), "\")
            
            'The last element in the array holds the task number
            strPred = vATemps(UBound(vATemps))
            Debug.Print strPred;
            
            'The second last element in the array holds the project name
            Debug.Print " in Project "; vATemps(UBound(vATemps) - 1)
        End If
    Next
Next
End Sub
You'd use a similar piece of code to handle Successors (or you could make it a callable routine).

Unfortunately, you can't drop this code into any of the predefined reports (View > Reports > ... )

If you're using a piece of VBA in Excel to open the MS Project file and then pull the data from Project into Excel then you can use this to separate the various Predecessors (or Successors) for a task and then put each item into its own cell or on to a separate line within a cell.
 
Thank you so much for taking the time to work through that code and to post it here. I'll let you know what happens when I test it (won't be until early next week). Thanks and have a good weekend!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top