+ Reply to Thread
Results 1 to 4 of 4

GET DATA macro bugs at end of line?

  1. #1
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    GET DATA macro bugs at end of line?

    I am using a macro to get data from closed workbooks, it works absolutely fine for 18 pieces of data (first part of macro)
    when i use to get another 18 pieces of data, it gets the data but then comes up with "Run-time error '1004' Method 'range' of object _global failed"

    Ive separeated the ones into 2 different macro thinking it could have been that but the lines highighted in red is the problem, as i said, it retrieves all data but falls over when it hits the private function data line for the last time (only on the second macro)

    I found the code online and adapted it, so i only understand the obvious bits
    the code will also be adapted to find other sheet names depending on cell values, so if anyone spots any suggestions, i'd be more than happy to recieve

    Cheers

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: GET DATA macro bugs at end of line?

    Yellow text dont stand out! whoops

    Please Login or Register  to view this content.
    This is where it will fall over AFTER it has got its data from the SUB rewraps()

  3. #3
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: GET DATA macro bugs at end of line?

    Could it be that you have declared a variable called Data$ but then trying to populate a variable called Data.
    Has Data been declared previously?
    If this was helpful then please click the small star icon at the bottom left of my post. A little appreciation goes a long way.

  4. #4
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: GET DATA macro bugs at end of line?

    Its working now, Have no idea what I done, but it fell over BEFORE the last line in taking data, i copied it again, and changed to relevant cells and its working???????

    Thanks though!

+ 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