View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Slow Text File Import


Have you considered opening the text file directly into Excel
and then formatting the file. Excel plops a text file into the
first column of a worksheet in tenths of a second...

Sub OpenTextFile()
Workbooks.Open "F:\Acme\Z2Compliance.txt"
End Sub

Also, have you declared all of your variables?
The code you posted doesn't show anything declared.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Klips" wrote in message oups.com...
Hi all,
I'm having problems finding out why the performance of my text file
import routine takes a hit after the first import operation. I have a
series of text files with a set format that I'd like to import into
individual sheets in excel. I have written a procedure that takes care
of this. The first file that I import is extremely fast. As soon as I
import the next file, the speed drops to 1/10 of the first time. The
speed deteriorates as I import more files, but the drop is more
gradual.

Here is the import code:
-snip-Any help is appreciated. If someone wants to take a look at the
complete file with sample text files, just let me know.
Thanks