Peter,
If I understand your posts correctly, you don't really need to copy or
transfer the assignment at all. Simply delete the assignment from the
original task and then assign the resource to the other task with the
desired start, finish and utilization.
Assume the original task is 5 (assignment to be removed) and the other
task is 3 (assignment to be added). Further assume the resource involved
is resourceID #1. [Note: for any given task the resource assignment
index is determined by the resource ID as shown on the Task Form (lower
split screen). The lowest resource ID is the first assignment index for
that task and so forth.] Also, assume you want the resource to be
assigned at a utilization of 50% with a start of 03/12/03 8:00:00 and a
finish of 03/12/23 17:00:00. With these assumptions the code to make the
assignment "switch" might look something like this:
Set AP = ActiveProject
AP.Tasks(5).Assignments(1).Delete
AP.Tasks(3).Assignments.Add ResourceID:=1
AP.Tasks(3).Assignments(1).Units = 0.5
AP.Tasks(3).Assignments(1).Start = "03/12/03 8:00:00"
AP.Tasks(3).Assignments(1).Finish = "03/12/23 17:00:00"
Hope this helps.
John