Insert code into each worksheet's "Sub Worksheet_SelectionChange" Function

  • Thread starter Thread starter John
  • Start date Start date
J

John

Is there a way to have a module insert a piece of code
into the each worksheets "WorkSheet_SelectionChange"
function. The worksheets are newly created so that is why
I have to insert the code from a module.

Thanks,
John
 
If it's all the same code, maybe you could use:
Workbook_SheetSelectionChange

It's under the ThisWorkbook module.

Private Sub Workbook_SheetSelectionChange _
(ByVal Sh As Object, ByVal Target As Range)

When you're testing, add a line (just to see how it passes important info):

msgbox sh.name & vblf & target.address
 
Back
Top