Hi,

I have created a macro in Excel 2003 that simply pastes values of copied cells. Here’s the code I have to do that:

Please Login or Register  to view this content.

The problem is I have many files each with multiple tabs named, for example, abc, def, hij, xyz, etc. and two windows opened in each of these files. I want to keep toggling (Alt+Tab) between window 1, Tab “abc” to window 2, Tab “xyz” to keep copying and pasting different values into Tab “xyz”. When I use the macro to paste the values into window 2, Tab “xyz”, the macro will briefly jump back to window 1, change it from Tab “abc” to Tab “xyz” and then it will go to window 2, Tab “xyz” to paste the values. It pastes the values without a problem, but the issue is when I toggle back to window 1, it is now on the same tab as window 2 (or Tab “xyz”.)

How can I update the macro to prevent it from changing tabs in window 1?