Visual Basic - Abrir txt

Life is soft - evento anual de software empresarial
 
Vista:

Abrir txt

Publicado por Mauro (45 intervenciones) el 19/02/2004 15:32:31
Queria saber como abrir un archivo txt desde vb6
gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Abrir txt

Publicado por Cecilia Colalongo (3116 intervenciones) el 19/02/2004 15:38:29
Tienes varias formas de hacerlo, esta es una:

Public Function FileToString(FileName As String) As String
On Error GoTo ErrorHandler

Dim hlngFile As Long, strFile As String

hlngFile = FreeFile

Open FileName For Binary Access Read As hlngFile

FileToString = vbNullString

strFile = String(FileLen(FileName), " ")

Get hlngFile, , strFile

Close hlngFile

FileToString = strFile

Exit Function

ErrorHandler:
FileToString = Empty
End Function
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar