# Re: 如何加快读取Txt档的速度..

Posted by AKL on January 22, 1999 at 01:10:03:

In Reply to: 如何加快读取Txt档的速度.. posted by Yizu on January 21, 1999 at 19:46:15:

Public Sub GetTextFileContent(sPathName As String, sTextContent As String)

Dim hFile As Long

hFile = FreeFile

Open sPathName For Binary Access Read As hFile
sTextContent = String(LOF(hFile), 0)
Get hFile, , sTextContent
Close hFile
'执行后 sTextContent就是档案内容
End Sub

Follow Ups: