I cannot see any reason for that.

I pasted the last code into my Peersonal workbook, also a hidden book and ran the macro with no issues.