I din't understand your intention of changing the code as such....

It is obvious to get the error since you haven't got all the sheets listed.