+ Reply to Thread
Results 1 to 5 of 5

Error "Subscript out of range", cant seem to find where code is wrong

  1. #1
    Registered User
    Join Date
    05-27-2013
    Location
    Buellton, California
    MS-Off Ver
    Excel 2007
    Posts
    26

    Error "Subscript out of range", cant seem to find where code is wrong

    Hello,

    I have gotten the error "Subscript out of range" for the lines within the With statement in my code, but I can't seem to figure out what is missing/wrong.
    The macro is supposed to get the data from multiple sheets in one workbook and paste it is a single sheet in another workbook.
    If you can spot it please let me know.

    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: Error "Subscript out of range", cant seem to find where code is wrong

    Is your destination workbook named "Name" ?
    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
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error "Subscript out of range", cant seem to find where code is wrong

    perhaps
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    05-27-2013
    Location
    Buellton, California
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Error "Subscript out of range", cant seem to find where code is wrong

    Yes, arlu1201 "Name" is where the data is going.

    Quote Originally Posted by JosephP View Post
    perhaps
    Please Login or Register  to view this content.
    Thanks JosephP, that worked!
    It copied the format of the cells in the source workbook though (green cell) is there a way to do paste special > values within the .copy destination:= part?

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error "Subscript out of range", cant seem to find where code is wrong

    don't copy and paste
    Please Login or Register  to view this content.

+ 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