Visual Basic - Contenido de Un archivo en un label

Life is soft - evento anual de software empresarial
 
Vista:

Contenido de Un archivo en un label

Publicado por Alexito (14 intervenciones) el 28/11/2007 18:40:10
HOLA AMIGOS QUISERA SABER COMO PONGO EL CONTENIDO DE UN ARCHVO *.TXT EN UN LABEL QUE ESTA EN EL FORMULARIO, 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:Contenido de Un archivo en un label

Publicado por Roman (33 intervenciones) el 28/11/2007 18:55:45
Dim fso As New Scripting.FileSystemObject
Dim ts As TextStream
Dim Line As String

Set ts = fso.OpenTextFile("archivo.txt", ForReading, False)
Do While Not ts.AtEndOfStream
Line = ts.ReadLine
label1 = label1 & Line & vbCrLf
Loop

(El vbCrLf es opcional, depende si pusiste el wordwrap del label en true o no)
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