LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default The Print # command print not all rows from excel sheet to file

I wonder if someone can help me with this.
I try to read from a text file with this piece of code;

Do While Not EOF(1) 'Voer uit t/m de laatste regel van het file
Line Input #1, strTemp 'Lees regel
Cells(RowNdx, ColNdx).Value = strTemp 'schrijf regel naar
Excel-sheet
RowNdx = RowNdx + 1 'Volgende regel
Loop
(This file is 110 lines long).
And so far is all going well.


But now I have to write all lines to another file (some lines are
modified).
Unfortunately stops the writing at line 100. (Some characters at the
end of line 100 are also missing).
The row counting is going on until the first empty row in the excel
sheet.
I herefor use this code;

Do While Not Cells(RowNdx, ColNdx) = "" 'Voer uit t/m de laatste
met tekst gevulde regel van het file
Print #1, Cells(RowNdx, ColNdx).Value 'schrijf regel naar file
RowNdx = RowNdx + 1 'Volgende regel
Loop

I don't know why the Print #1-command suddenly stops writing to the
file at line 100????
Can someone help me with this??

Thanks,
Pieros.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
command line options/switches to print excel file Stranger[_2_] Excel Worksheet Functions 2 March 18th 09 06:36 AM
command line options/switches to print excel file Stranger[_2_] Excel Discussion (Misc queries) 1 March 17th 09 01:04 PM
how to print a sheet by command ghost Excel Discussion (Misc queries) 4 May 1st 07 05:33 PM
How to format the extension less file to print with Dos's Print Command Badshah Excel Discussion (Misc queries) 0 November 28th 06 12:44 PM
Create command button to print multiple worksheets in a excel file MarcoR Excel Discussion (Misc queries) 3 June 26th 06 07:07 PM


All times are GMT +1. The time now is 08:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"