+ Reply to Thread
Results 1 to 3 of 3

Modify an existing macro to not copy to the same workbook but another one.

  1. #1
    Registered User
    Join Date
    08-10-2009
    Location
    Tallinn, Estonia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Modify an existing macro to not copy to the same workbook but another one.

    I have about 300 lines of the following macro:

    Please Login or Register  to view this content.
    It copies from 6 different tables data to sheet1 in the same workbook.
    Now I would like to change it so that it will copy the data to another workbook I have open. The name of the new workbook is “Andmed” (file name). Sheet name is still sheet1. The workbook name of the file where I will copy from will change as I need to run this macro about 200 times. I will probably run the macro from this workbook but store it in “Andmed” workbook.
    Also before copying the data it should insert a new line to workbook “Andmed” sheet1 line2. To greate a space for the data as not to overwrite previous data.

    All help will be greatly appreciated,
    Last edited by arlu1201; 04-29-2013 at 02:11 AM.

  2. #2
    Registered User
    Join Date
    08-10-2009
    Location
    Tallinn, Estonia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Modify an existing macro to not copy to the same workbook but another one.

    Sorry i managed to solve it. As soon as i had posted this i found an online solution. This just happens sometimes. If anyone who needs help will look here i will post the solution here also:

    Please Login or Register  to view this content.
    Last edited by arlu1201; 04-29-2013 at 02:11 AM.

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

    Re: Modify an existing macro to not copy to the same workbook but another one.

    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.
    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]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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