|
If Dir(strNameFile, vbDirectory) <> "" Then( , )
FileName = "C:\1\1.txt" f = FreeFile Open FileName For Input As f Do While Not EOF(f) FileTxt = Input(1, #f) Debug.Print UsefulTxt Loop Close #f
Set FSO = CreateObject("Scripting.FileSystemObject") If FSO.FileExists(strNameFile) Then Set FSTR = FSO.OpenTextFile(strNameFile) BodyTxt = FSTR.ReadAll FSTR.Close Set FSTR = Nothing End If
For aa = 1 To 100 For ee = 1 To 110 If Dir(strMyFileNameTo, vbDirectory) <> "" Then End If Next ee Next aa
While Dir(strNameFile) = "" a = a + 1 If a = 10000 Then ' GoTo ReadTXT_Error End If DoEvents Wend, .
http://www.sql.ru/forum/1184155/schityvanie-tekstovyh-faylov-v-cikle