Ok.
But with this code and in VB Work fine
FileNumber = FreeFile
Open "c:\testes\teste.ual" For Input As #1
Do While Not EOF(FileNumber)
Line Input #FileNumber, DF
List1.AddItem DF
Loop
This VB code open in ASCII code!?
H.S
"Pegasus (MVP)" <I.can@xxxxxx> escreveu na mensagem
news:ef1eB%23mHJHA.788@xxxxxx
Quote:
>
> "teste" <wq@xxxxxx> wrote in message
> news:newscache$4rmp7k$az$1@xxxxxx Quote:
>> Hi
>> Thankyou for the replay but dont work fine.
>>
>>
>> CRLF = Chr(13) & Chr(10)
>> sFileName = "c:\testes\teste.ual"
>> Set oFSO = CreateObject("Scripting.FileSystemObject")
>> Set oFile = oFSO.OpenTextFile(sFileName)
>> aFileArray = Split(oFile.ReadAll, CRLF)
>>
>> Text1.Text = aFileArray(0)
>>
>> Text2.Text = UBound(aFileArray)
>>
>> The Text1 display "ÿþ2"
>>
>> The Text2 display "0"
>>
>> When I open "c:\testes\teste.ual" With NotePad" display exactli
>>
>> 23-09-2008 14:23: Alarme de teste Medium Alarm
>> 23-09-2008 14:23: Alarme de teste Automatically Acknowledged
>> 23-09-2008 14:23: Alarme de teste Cleared
>> 23-09-2008 14:23: Alarme de teste Medium Alarm
>> 23-09-2008 14:23: Alarme de teste Automatically Acknowledged
>> 23-09-2008 14:23: Alarme de teste Cleared
>> 23-09-2008 14:23: Alarme de teste Medium Alarm
>> 23-09-2008 14:23: Alarme de teste Automatically Acknowledged
>> 23-09-2008 14:23: Alarme de teste Cleared
>> 23-09-2008 14:23: Alarme de teste Medium Alarm
>> 23-09-2008 14:23: Alarme de teste Automatically Acknowledged
>> 23-09-2008 14:23: Alarme de teste Cleared
>
> This is probably because your text file is not an ASCII file but a Unicode
> file. Check the help file "script56.chm" (downloadable from the Microsoft
> site) for the full syntax of the OpenTextFile method and how to specify
> that the file should be opened in Unicode format.
>