View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Charles Charles is offline
external usenet poster
 
Posts: 62
Default Smart way to delete the first row of a huge file

I did a test using the following loop

Sub test2()
Dim txt As String, i As Long
For i = 1 To 190
Application.StatusBar = i
txt = txt & Space(1000000)
Next i
MsgBox "Success"
End Sub

it breaks at the step 105, which seems to mean that VBA is running out
of memory with a string larger than 104m characters. Excel total
memory usage was around 350MB, so far below the 2GB XL limit, and my
installed memory (about 2GB as well)
So it looks like there is another memory limit for strings.

Charles