I am submitting this from a macro and get the following error
" RunTime error 9 subscript out of range"
And when I open the debugger the line
is in error
"Bernard Liengme" wrote:
I am assuming: (1) the column is A, and (2) you want to start at row 1.
This subroutine looks at column A on Sheet2 and on Sheet3 in column A it
lists the row number of every empty cell. The Sheet3 could be copied to a
text file or saved as a TXT file.
lastcell = Cells(Cells.Rows.Count, "A").End(xlUp).Row
For j = 1 To lastcell
If Cells(j, 1) = "" Then
k = k + 1
Sheets("Sheet3").Cells(k, 1) = j
Bernard V Liengme
Microsoft Excel MVP
remove caps from email
"vbnewbie" wrote in message
I am trying to read all empty cells in a column then append the rows that
cells are in to a text file using VB6
Microsoft EXCEL 2003