Ok, lets say you have a workbook that has the following sheets (names) in it:
- Summary
- A
- B
- C
- Calculations
- Data
- Log
In the VBA Editor (when you press alt+F11), in the Project - VBAProject window, you should see a list of the worksheets and workbook under the "Microsoft Excel Objects" group that would look something like this:
- Sheet1 (Summary)
- Sheet2 (A)
- Sheet3 (B)
- Sheet4 (C)
- Sheet5 (Calculations)
- Sheet6 (Data)
- Sheet7 (Log)
- ThisWorkbook
Up until this point, you were storing the code at what is known as the "worksheet level" or in a "worksheet module". This means that the code has been going into those objects that are worksheets (Sheet1, Sheet2, Sheet3, etc). However, the code I have recently given you, the Workbook_SheetChange code, is stored in the "ThisWorkbook" module. By storing the updated code in the "ThisWorkbook" module, you can remove all of the other Worksheet_Change codes you previously put in.
If you are copying/pasting things from one workbook to another, and you want to maintain this functionality in the new workbook, you
must copy/paste over the VBA code as well. The benefit to using the Workbook_SheetChange code instead of using a bunch of Worksheet_Change codes is that, for your needs, you want the same exact code to run, just on specific worksheets.
There is absolutely no way around this (as far as I am aware) in order to maintain your original requirements.