+ Reply to Thread
Results 1 to 2 of 2

Speeding up VBA

  1. #1
    Registered User
    Join Date
    11-21-2005
    Posts
    46

    Question Speeding up VBA

    Hi all,

    I used this code a couple of weeks back without a problem, however, when I run the code now (to import text files of over 1.8m rows) it runs much much more slowly. I was previously able to import a file in 5-10 minutes, yet now I've calculated that this could take around a year at this rate!! I was wondering if there's something in the code which is causing it to get stuck, or anything that is unecessary which may be causing it to get hung up.

    I don't think it's a computer issue, as I'm running this on a new PC which has 4GB RAM and over 200GB of free HD space.

    The code is as follows:

    Please Login or Register  to view this content.
    I hope you are able to help speed this up and get it back to its optimum!

    Many thanks,
    smurray444

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Several things

    I notice that your screenupdating = false is commented out?

    You also have a cells.replace. Could you reduce the range size to something less that the whole sheet?

    Even writing to the status bar takes some resource - why not update it every thousand rows.
    Martin

+ 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