ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Text Export/Append (https://www.excelbanter.com/excel-programming/350021-text-export-append.html)

Mr. C

Text Export/Append
 
I am new to this so bear with me. Using XL 2003 and Windows XP Pro
I have an XL workbook with 2 sheets. Users use one sheet (CheckRequest) to
enter the details of a check request and the other (BatchFile) details data
in the range A1:X262, one row at a time(eg. A4:X4). The workbook is used to
create check requests one at a time. I want a macro to print the CheckRequest
sheet and create a text file from BatchFile the first time a user generates a
request and then append to the text file for subsequent user requests. The
text file will be 'dumped and deleted' once a day.
The first 3 rows of BatchFile are always used and Column X contains a 4
digit location identifier for all 'used' rows and "0" (zero) in the first and
subsequent rows not used. This is to allow a maximum of 259 rows of data but
as few as 1 is used. I would like to export only the first 'n' rows of
BatchFile by detecting the first zero in Column X after Row 3.
I see from other postings that I can use
Open "C:\BatchFile.txt" For Append As FreeFile()
to create/append a file but am not sure how to write only the rows used to
the text file.
Any help is appreciated.
--


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com