I wonder if it's something to do with the size of the Excel "undo" list
(although I wouldn't have expected a macro to be adding to that).
Rather than hide/unhide the rows one by one, why not remember the start row
of an area, then use Range (top cell, bottom cell) to mark the multiple rows
to receive a single hide or unhide?