It seems that when it gets to this line of code
.Shapes("Button A").Visible = True
is where the error happens, whether it is set to true or false. It's happening on every sheet. At least the code wont run beyond that line in any sheet, not sure why though.