Project 98 Resource Pool Bug?? 
Author Message
 Project 98 Resource Pool Bug??

Is this a bug or am I just losing my mind.
I have two .mpp files. Pool.mpp is a resource pool file and has 3
resources with unique id's of 3,4 and 5 for example.
PoolUser.mpp is an .mpp file that uses pool.mpp
Firstly I noticed that the resources from the resource pool get new
unique id's in the PoolUser.mpp file. In that file the resources have
unique id 1,2 and 3.
Now when I run this code I get an error.

Dim oProject As MSProject.Application
Dim oActiveProject As Project
Dim oResource As Resource
Dim oResources As Resources

Dim sRes As String

Set oProject = New MSProject.Application
Set oActiveProject = oProject.ActiveProject
Set oResources = oActiveProject.Resources

'Loop through all of the resources and put the id's into a delimted
string
For Each oResource In oResources
    If Len(sRes) = 0 Then
        sRes = oResource.UniqueID
    Else
        sRes = sRes & "," & oResource.UniqueID
    End If
Next

' Do some stuff

Dim aRes() As String
Dim i As Integer
Dim lResource As Long

'Take the delimted string of unique id's and find the corresponding
resource.
aRes = Split(sRes, ",")
For i = 0 To UBound(aRes)
    lResource = aRes(i)
    Set oResource = oResources.UniqueID(lResource)'****Error here
Next

What seems to be happening is that in the first part when creating the
list of unique id's , the id's are coming from the resource pool IE
3,4,5.
BUT in the second part when I'm looping through that list of IDs it
seems to be looking at the unique ids that are in the PoolUser.mpp IE
it would fail on
Set oResource = oResources.UniqueID(4) because there is no resource
with a unique id in the PoolUser.mpp.

This only seems to be a problem in Project 98.

Has anyone else noticed this? Any solutions?

Thanks
Orla



Tue, 27 Jan 2004 23:52:32 GMT  
 Project 98 Resource Pool Bug??
OrlaH

Use resource names to identify the resources instead of uniqueid. So put
resource names inside your array (Make sure not to duplicate resource names
while creating resources). In this case [Set oResource =
oResources.UniqueID(lResource)] can be changed to [Set oResource =
oResources(lResource)]

Regards
Venkata Krishna


Is this a bug or am I just losing my mind.
I have two .mpp files. Pool.mpp is a resource pool file and has 3
resources with unique id's of 3,4 and 5 for example.
PoolUser.mpp is an .mpp file that uses pool.mpp
Firstly I noticed that the resources from the resource pool get new
unique id's in the PoolUser.mpp file. In that file the resources have
unique id 1,2 and 3.
Now when I run this code I get an error.

Dim oProject As MSProject.Application
Dim oActiveProject As Project
Dim oResource As Resource
Dim oResources As Resources

Dim sRes As String

Set oProject = New MSProject.Application
Set oActiveProject = oProject.ActiveProject
Set oResources = oActiveProject.Resources

'Loop through all of the resources and put the id's into a delimted
string
For Each oResource In oResources
    If Len(sRes) = 0 Then
        sRes = oResource.UniqueID
    Else
        sRes = sRes & "," & oResource.UniqueID
    End If
Next

' Do some stuff

Dim aRes() As String
Dim i As Integer
Dim lResource As Long

'Take the delimted string of unique id's and find the corresponding
resource.
aRes = Split(sRes, ",")
For i = 0 To UBound(aRes)
    lResource = aRes(i)
    Set oResource = oResources.UniqueID(lResource)'****Error here
Next

What seems to be happening is that in the first part when creating the
list of unique id's , the id's are coming from the resource pool IE
3,4,5.
BUT in the second part when I'm looping through that list of IDs it
seems to be looking at the unique ids that are in the PoolUser.mpp IE
it would fail on
Set oResource = oResources.UniqueID(4) because there is no resource
with a unique id in the PoolUser.mpp.

This only seems to be a problem in Project 98.

Has anyone else noticed this? Any solutions?

Thanks
Orla



Thu, 29 Jan 2004 05:21:31 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Replace project resources with pool resources

2. Identify a Project as a resource pool

3. Check for consolidated project or resource pool

4. Project Macros and Resource Pools

5. Resource Pool and Competence Pool

6. ODBC Connection Pooling Vs OLE DB Resource Pooling

7. ODBC Connection Pooling Vs OLE DB Resource Pooling

8. Adding resources to Global Resource Pool

9. Resources in a resource pool in date range

10. Shared Resources/Resource Pool

11. MS Project 98 vs Ms Project 2000

12. Urgent Fix - Resource String Table Problem NT, Win 98

 

 
Powered by phpBB® Forum Software