Resource.Overallocated 属性 (Project)
如此 如果资源处于过度分配状态。 只读 Boolean。
语法
expression。 Overallocated
表达 一个代表 Resource 对象的变量。
备注
过度分配 属性不返回任何有意义的信息,对于材料资源。
示例
下面的示例显示活动项目中处于过度分配状态的资源百分比。
Sub DisplayOverallocatedPercentage()
Dim R As Resource ' Resource object used in For Each loop
Dim NOverallocated As Long ' Number of overallocated resources
For Each R In ActiveProject.Resources
If R.Overallocated Then NOverallocated = NOverallocated + 1
Next R
MsgBox (Str$((NOverallocated / ActiveProject.Resources.Count) * 100) _
& " percent (" & Str$(NOverallocated) & "/" & Str$(ActiveProject.Resources.Count) _
& ")" & " of the resources in this project are overallocated.")
End Sub
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。