Resource Object, Resources Collection Object

Multiple objects
Resources
Resource
Multiple objects

Represents a resource or resources. The Resource object is a member of the Resources collection.

Using the Resource Object

Use Resources(Index), where Index is the resource index number or resource name, to return a single Resource object. The following example lists the names of all resources in the active project.

Dim R As Long, Names As String

For R = 1 To ActiveProject.Resources.Count
    Names = ActiveProject.Resources(R).Name & ", " & Names
Next R

Names = Left$(Names, Len(Names) - Len(ListSeparator & " "))
MsgBox Names

Using the Resources Collection

Use the Resources property to return a Resources collection. The following example generates the same list as the previous example, but does it by setting an object reference to

ActiveProject.Resources

, and then using

R

where

ActiveProject.Resources

is used.

Dim R As Resources, Temp As Long, Names As String

Set R = ActiveProject.Resources
    
For Temp = 1 To R.Count
    Names = R(Temp).Name & ", " & Names
Next Temp
    
Names = Left$(Names, Len(Names) - Len(ListSeparator & " "))
MsgBox Names

Use the Add method to add a Resource object to the Resources collection. The following example adds a new resource named Matilda to the active project.

ActiveProject.Resources.Add "Matilda"

Properties | AccrueAt Property | ActualCost Property | ActualOvertimeCost Property | ActualOvertimeWork Property | ActualOvertimeWorkProtected Property | ActualWork Property | ActualWorkProtected Property | ACWP Property | Application Property | Assignments Property | Availabilities Property | AvailableFrom Property | AvailableTo Property | BaseCalendar Property | BaselinenCost Property | BaselinenWork Property | BCWP Property | BCWS Property | BookingType Property | Calendar Property | CanLevel Property | Code Property | Confirmed Property | Costn Property | CostPerUse Property | CostRateTables Property | CostVariance Property | Count Property | Created Property | CV Property | Daten Property | Durationn Property | EMailAddress Property | Enterprise Property | EnterpriseBaseCalendar Property | EnterpriseCheckedOutBy Property | EnterpriseCostn Property | EnterpriseDaten Property | EnterpriseDurationn Property | EnterpriseFlagn Property | EnterpriseGeneric Property | EnterpriseInactive Property | EnterpriseIsCheckedOut Property | EnterpriseLastModifiedDate Property | EnterpriseMultiValuen Property | EnterpriseNameUsed Property | EnterpriseNumbern Property | EnterpriseOutlineCoden Property | EnterpriseRBS Property | EnterpriseRequiredValues Property | EnterpriseTextn Property | EnterpriseUniqueID Property | Finishn Property | Flagn Property | Group Property | GroupBySummary Property | Hyperlink Property | HyperlinkAddress Property | HyperlinkHREF Property | HyperlinkScreenTip Property | HyperlinkSubAddress Property | ID Property | Index Property | Initials Property | Item Property | LinkedFields Property | MaterialLabel Property | MaxUnits Property | Name Property | Notes Property | Numbern Property | Objects Property | OutlineCoden Property | Overallocated Property | OvertimeCost Property | OvertimeRate Property | OvertimeWork Property | Parent Property | PayRates Property | PeakUnits Property | PercentWorkComplete Property | Phonetics Property | Project Property | RegularWork Property | RemainingCost Property | RemainingOvertimeCost Property | RemainingOvertimeWork Property | RemainingWork Property | ResponsePending Property | StandardRate Property | Startn Property | SV Property | TeamStatusPending Property | Textn Property | Type Property | UniqueID Property | UpdateNeeded Property | VAC Property | WindowsUserAccount Property | Work Property | Workgroup Property | WorkVariance Property

Methods | Add Method | AppendNotes Method | Delete Method | EnterpriseTeamMember Method | GetField Method | Level Method | SetField Method | TimeScaleData Method

Parent Objects | Cell Object | Project Object, Projects Collection Object | Selection Object | Task Object, Tasks Collection Object

Child Objects | Assignment Object, Assignments Collection Object | Availability Object, Availabilities Collection Object | Calendar Object, Calendars Collection Object | CostRateTable Object, CostRateTables Collection Object | PayRate Object, PayRates Collection Object | TimeScaleValue Object, TimeScaleValues Collection Object

See Also | Resources Property | Resources Property