+ Reply to Thread
Results 1 to 6 of 6

copy rows from wb to another

  1. #1
    Registered User
    Join Date
    11-19-2010
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003
    Posts
    14

    copy rows from wb to another

    Hi.
    I am trying to do a macro that will copy rows from workbook x to workbook y where data in workbook x column a matches my argument in workbook y cell a1. hope this makes sense!
    anyway i did this macro but it does not work.

    Please Login or Register  to view this content.

  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 rows from wb to another

    Are you getting any error?

    Also it looks that you have declared x and y as workbooks but you are assigning sheets to them which might be a part of the problem.

  3. #3
    Registered User
    Join Date
    11-19-2010
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: copy rows from wb to another

    I get 'Subscript out of range'

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

    Re: copy rows from wb to another

    Attach the workbook which you are using along with the code. Or a sample workbook so that we can test the code along with the data and help you easily.

  5. #5
    Registered User
    Join Date
    11-19-2010
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: copy rows from wb to another

    Awesome. The code is in 'graftimesag_ugentlig' under module1. The 'timesag_data' is the sheet refered to as x in the code.

    Cheers!
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-19-2010
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: copy rows from wb to another

    I solved this by deleting the rows i dont need after copy. Thanks for your time!

+ 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