+ Reply to Thread
Results 1 to 3 of 3

Code runs when I step through it, but not when I run the whole program

  1. #1
    Registered User
    Join Date
    05-25-2006
    Posts
    42

    Question Code runs when I step through it, but not when I run the whole program

    I've got a pretty simple macro where I unhide a column of data, extract data from that column and then hide it. When I step through the code for debugging, it works perfectly. However, when I execute the macro, the program bombs out when I'm extracting data. The reason why is that the column was never unhidden.

    What would cause the program to work when I step through it, but not when I execute the entire program? I have disabled the screen updating as well as the enabled events, but when I comment those out, it has no effect.

    Thoughts?
    Last edited by gonger; 11-11-2010 at 12:35 PM.

  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,091

    Re: Code runs when I step through it, but not when I run the whole program

    You might want to consider sharing the code on the forum or, even better, posting the workbook to assist the investigation.

    Regards
    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


  3. #3
    Registered User
    Join Date
    05-25-2006
    Posts
    42

    Re: Code runs when I step through it, but not when I run the whole program

    Never mind ... I figured it out. Just a dumb mistake on my behalf. Thanks

+ 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