You can't import a file with more than 65,536
(1,024 x 64) records. You'll have to query this
data using Excel's External Data or PivotTable
features.
GOTTA BE A WAY TO EDIT A VERY LARGE FIEL. CAN I CHANGE THE MEMORY ALLOCATION UPON START-UP?
Nope! See the Excel Help Topic for
"What's new with specifications and performance?".
Bob,
I use this to import text files with more than 65536 lines:
Sub LargeFileImport()
Dim ResultStr As String, FileName As String
Dim FileNum As Integer
Dim Counter As Double
FileName = Application.GetOpenFilename("Text Files (*.txt), *.txt", , "Please select the huge text file to import (more than 65536 lines)")
If FileName = "" Then End
FileNum = FreeFile()
Open FileName For Input As #FileNum
Application.ScreenUpdating = False
Workbooks.Add template:=xlWorksheet
Counter = 1
Do While Seek(FileNum) <= LOF(FileNum)
Application.StatusBar = "Importing Row " & Counter & " of text file " & FileName
Line Input #FileNum, ResultStr
If Left(ResultStr, 1) = "=" Then
ActiveCell.Value = "'" & ResultStr
Else
ActiveCell.Value = ResultStr
End If
If ActiveCell.Row = 65530 Then
ActiveWorkbook.Sheets.Add
Else
ActiveCell.Offset(1, 0).Select
End If
Counter = Counter + 1
Loop
Close
Application.StatusBar = False
End Sub
Hope it helps
Rob
...if you don't mind breaking your data into separate
worksheets. In fact, here's Microsoft's
recommendation:
http://support.microsoft.com/support/kb/articles/Q120/5/96.asp?LN=EN-US&SD=gn&FR=0&qry=more%20than%2065536&rnk=6&src=DHCS_MSPSS_gn_SRCH&SPR=XLW97