+ Reply to Thread
Results 1 to 2 of 2

Run time error 6 - Macro that doesn't end

  1. #1
    Forum Contributor
    Join Date
    06-06-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    180

    Run time error 6 - Macro that doesn't end

    Hi All,

    I have written the macro below which unfortunately keeps looping because of the way I have written it. The problem area is effectively the below code because everytime the file path is blank i have coded the macro to move onto the next line to locate a filepath until it finds another. The issue is that the loop never stops. Effectively I want the loop to stop after 66 trys. Any help would be greatly appreciated in fixing this problem.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Run time error 6 - Macro that doesn't end

    Aren't these two lines mutually exclusive ...

    Please Login or Register  to view this content.
    It only gets into the loop if file is not blank. Then, in the loop, it does nothing because file is not blank
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 7
    Last Post: 12-06-2018, 02:02 PM
  2. [SOLVED] Macro doesn't correctly replace "." with "," and getting Run-time error '1004'.
    By H.Gabor in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-26-2018, 06:36 AM
  3. [SOLVED] Run-time error 438: Object doesn't support
    By abhinavbinkar in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-17-2018, 10:53 AM
  4. VBA Excel error - Run-time error '438': Object doesn't support this property or method
    By officialhoad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2017, 09:42 AM
  5. [SOLVED] Getting run-time error 438 'object doesn't support this property or method'
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-24-2016, 10:00 PM
  6. Macro doesn't run first time but the second time it runs perfect
    By flunzy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-19-2013, 11:00 AM
  7. Run-Time Error '438' - Object doesn't support this property or method
    By rajibyumnam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2011, 03:24 AM

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