+ Reply to Thread
Results 1 to 3 of 3

Copy selected row to another workbook

  1. #1
    Registered User
    Join Date
    05-24-2013
    Location
    Sines, Portugal
    MS-Off Ver
    Excel 2003
    Posts
    5

    Copy selected row to another workbook

    The code below allows to copy the values ​​from the selected row of a sheet ("Registos") to another sheet ("Resultados"), within the same workbook ("Livro1.xls").
    So, each time I select the row, it is copied to the sheet, always to the next row of that sheet.
    Works perfectly as I could test.
    Here is the code:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    I would like to know, and for that I need your help, is doing the same, but copying selected rows to the sheet ("Resultados"), but in another workbook (Livro2.xls).
    I've tried several ways but it does not work as in the previous example.
    I have the following code that opens and closes the other workbook (Livro2.xls), but this always copies the same row.

    This is the code I have:

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    I would be most grateful if someone could help me to solve this problem, because I need the code to finish the work I'm developing.
    Bellow are the attached files to your appreciation.


    Thank you for all

    Angra2013
    Attached Files Attached Files
    Last edited by arlu1201; 06-10-2013 at 01:27 AM. Reason: Send Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy selected row to another workbook

    Welcome to the forum.

    I have added code tags to your posts. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.

    Also,

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    05-24-2013
    Location
    Sines, Portugal
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Copy selected row to another workbook

    Copying selected rows to the sheet ("Resultados"), but in another workbook (Livro2.xls
    Here is the code:

    Please Login or Register  to view this content.
    All the best,
    Angra 2013

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1