Browse » Home
Wednesday, May 15, 2013
How to Open Large Files in Excel 2003
1. Launch Excel, and navigate to the 'tools' menu.
2. Choose the 'macro' submenu, and select the Visual Basic editor.
3. Choose 'module' from the insert menu.
4. Copy and paste the following text:Sub LargeFileImport()'Dimension VariablesDim ResultStr As StringDim FileName As StringDim FileNum As IntegerDim Counter As Double'Ask User for File's NameFileName = InputBox('Please enter the Text File's name, e.g. test.txt')'Check for no entryIf FileName = '' Then End'Get Next Available File Handle NumberFileNum = FreeFile()'Open Text File For InputOpen FileName For Input As #FileNum'Turn Screen Updating OffApplication.ScreenUpdating = False'Create A New WorkBook With One Worksheet In ItWorkbooks.Add template:=xlWorksheet'Set The Counter to 1Counter = 1'Loop Until the End Of File Is ReachedDo While Seek(FileNum)
5. Press the F5 key to run the macro.