LEER UN ARCHIVO DE TEXTO
Publicado por BENJAS (18 intervenciones) el 04/03/2004 19:00:27
AYUDA POR FAVOR, ya referencie a "Microsoft scripting Runtime"
e hice esto:
dim lineaALeer as string
dim fso As FileSystemObject
dim txt As TextStream
dim archivo As File
set archivo = fso.getfile(c:\archivo.txt)
archivo.OpenAsTextStream
Set txt = archivo.OpenAsTextStream(ForReading)
lineaALeer = txt.readline & vbCrLf
pero me aparece el error:OBJECT VARIABLE OR WITH BLOCK VARIABLE NOT SET,
GRACIAS ME URGE
e hice esto:
dim lineaALeer as string
dim fso As FileSystemObject
dim txt As TextStream
dim archivo As File
set archivo = fso.getfile(c:\archivo.txt)
archivo.OpenAsTextStream
Set txt = archivo.OpenAsTextStream(ForReading)
lineaALeer = txt.readline & vbCrLf
pero me aparece el error:OBJECT VARIABLE OR WITH BLOCK VARIABLE NOT SET,
GRACIAS ME URGE
Valora esta pregunta


0