Article ID: 137167
Article Last Modified on 10/11/2006
Sub Macro1()
Dim X as Object
' Add resource to task and set variable X equal to first
' resource assignment
Set X = Projects(1).Tasks(1).Assignments.Add(1,1)
' Display unique ID for first resource assignment
MsgBox X.UniqueID
' Add resource to task a second time and set
' variable X equal to second resource assignment
Set X = Projects(1).Tasks(1).Assignments.Add(1,1)
' Display unique ID for second resource assignment
MsgBox X.UniqueID
End Sub
the second dialog box that should return the unique ID of the second
resource assignment (2) displays the value 1 instead.
' Assignments(2) is the second resource assignment ' for the first task MsgBox Projects(1).Tasks(1).Assignments(2).UniqueIDMicrosoft provides examples of Visual Basic procedures 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 Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.
add
Additional query words: ole automation
Keywords: kbcode kbprb kbprogramming KB137167