Excel 2000 vs Excel 2003
I can use this sub on Excel 2003 (11) and it runs fine:
Sub MarkSub(CurrentSub As String)
Dim rng As Range
Dim NextEmpty As Integer
' The next line is where the error occurs
Set rng = Workbooks(1).Sheets("Progress").Cells(Rows.count, 1).End(xlUp)
NextEmpty = rng.Row + 1
Workbooks(1).Worksheets("Progress").Range("A" & NextEmpty).Value =
CurrentSub
End Sub
However, when it is run on Excel 2000 (9), it gives a error at the line I
commented above. I was told it was an out of range error.
Can anyone suggest a workaround?
TIA,
Ken
|