Consulting

Results 1 to 2 of 2

Thread: runtime error 1100 when attempting to paste

  1. #1
    VBAX Newbie
    Joined
    Jul 2010
    Posts
    1
    Location

    runtime error 1100 when attempting to paste

    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

    [vba]
    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
    [/vba]
    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

    [vba]
    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
    [/vba]
    thank you

  2. #2
    VBAX Regular
    Joined
    Dec 2010
    Posts
    14
    Location
    I would like to know that too ^^ can someone answer?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •