The Macro crashes if I do not have the correct Excel in view.

ie. if i am working on a different excel it wont work.

Is there any work around?