Microsoft Excel 97 can not move worksheets to the end of a workbook if the current end worksheet is hidden. Moved sheets will be placed before the hidden sheet.
To work around this, simply reorder all hidden worksheets to the beginning of the workbook.