Macro works fine for me as expected. Are you getting any issues or error message?
Well, in one place, you are declaring swApp and swStatus as if you are using early binding, which what I would recommend. On the other hand, you are setting swApp as if you are using late binding. My guts tells you have some missing references. Add the SOLIDWORKS 20XX type library and SOLIDWORKS 20XX constant type library from Tools > References. You don't want go in the late binding route unless you are a robot that has memorized the entire api back to back .