*-- Select individual sheet from opened XLS File sh = OleApp.application.application.WorkBooks(1).Sheets(m.lnSheet) sh.select lcStr = OleApp.application.ActiveSheet.name ** Do this only for non-SUMMARY sheets in the spreadsheet if !("SUMMARY" $ upper(m.lcStr)) lnDoneSheets = m.lnDoneSheets + 1 ** Delete first N unused rows for lnRow = 1 to m.tnStartFromRow sh.range("A" + alltrim(str(m.lnRow))).select OleApp.application.selection.EntireRow.delete endforFor some strange reason this code deletes wrong rows, not the first tnStartFromRow