What would be the approach for a macro that places a Worksheet_Change(ByVal Target As Range) worksheet into the worksheet modules of 20 identical worksheets in a workbook that has 25 worksheets?
1 Answers
2
votes
Change to a Workbook_SheetChange and use the Sh argument to determine the worksheet receiving the changes.
Example:
Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
select case sh.name
case "Sheet1", "Sheet2", "Sheet3"
'do something
case else
'do nothing
end select
End Sub