Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
my text file is of fixed width format..I have 2 problems
that I've tried to troubleshoot.. 1) An error is highlighted at Line 5 (RunTime error 1004 Application-defined or object-defined error) 2)The data was correctly diplayed in cells BUT there are blanks rows between the cells with correct data( the nos of blank row varies) par of the code: Do While Not EOF(1) Line Input #1, data Worksheets("Sheet1").Activate Line5: Cells(i, 1).Value = Mid(data, 1, 8) i=i+1 Loop some kind member pls advise ...thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can't say why you get blank lines - are you sure you txt file doesn't have
blank lines in it. As far as the error, I suspect you haven't initialized the value of i to a legitimate row number before you loop starts. -- Regards, Tom Ogilvy "hallie" wrote in message ... my text file is of fixed width format..I have 2 problems that I've tried to troubleshoot.. 1) An error is highlighted at Line 5 (RunTime error 1004 Application-defined or object-defined error) 2)The data was correctly diplayed in cells BUT there are blanks rows between the cells with correct data( the nos of blank row varies) par of the code: Do While Not EOF(1) Line Input #1, data Worksheets("Sheet1").Activate Line5: Cells(i, 1).Value = Mid(data, 1, 8) i=i+1 Loop some kind member pls advise ...thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
to read text tablimited file | Excel Discussion (Misc queries) | |||
How do you save an excel file to be read as IBM-type text file ? | Excel Worksheet Functions | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) | |||
Read data from a text file (*.txt) | Excel Programming | |||
Read text file | Excel Programming |