+ Reply to Thread
Results 1 to 2 of 2

debugging short piece of code

  1. #1
    Registered User
    Join Date
    03-29-2010
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    70

    debugging short piece of code

    I wrote the code below to download data from 100 *.csv files, copy and paste one line of data from each into a spreadsheet (spreadsheet attached). The code runs sometimes, but other times Excel goes into 'not responding' and it just hangs. I tried to divide up the processing burden into multiple modules, each with identical code but just a shorter piece of the total loop (now 6 modules), but it still occasionally hangs up. When it freezes the debugger highlights this line ' .Refresh BackgroundQuery:=False', so this could be the culprit. Does anyone have any ideas? Perhaps I've structured the module incorrectly... or missed something basic. Thanks so much!


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646
    Try removing that line.
    If posting code please use code tags, see here.

+ 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