PDA

View Full Version : runtime error 1100 when attempting to paste



dumasfr
07-06-2010, 01:08 PM
hello, I am attempting to automatically paste a task from one project to an other and get the runtime error 1100.

the code I use is the following


Private Sub CommandButton1_Click()

Projects("master").Activate

SelectRow row:=Projects("master").Tasks(UserForm1.ComboBox2.Value).ID
EditCopy
ThisProject.Activate
SelectRow row:=ThisProject.Tasks.Count + 1
EditPaste

End Sub

the task I am selecting into the "master" project contains sub_tasks that I also want to paste.

---------------------------------------------------------------------

Edit, I found what was wrong and will post my solution here for other people to find.

when using SelectRow, there is an optional argument call RowRelative which is True by default. I was more than likely trying to paste something that did not existed or in some place that could not be recognized.

here is the final functionning code


Private Sub CommandButton1_Click()

Projects("master").Activate

SelectRow row:=Projects("master").Tasks(UserForm1.ComboBox2.Value).ID, RowRelative:=False
EditCopy
ThisProject.Activate
SelectTaskField row:=ThisProject.Tasks.Count + 1, Column:="Name", RowRelative:=False
EditPaste

End Sub

thank you

mbm123
12-07-2010, 12:30 AM
I would like to know that too ^^ can someone answer?