Make sure the sheet 2 is the active window. If sheet 1 already has frozen pane, it might generate that error.

Haven't check the file yet, but the first thing to check would be if Sheet2 is in fact the active window.