Insert Code with Worksheet

  • Thread starter Thread starter iamnu
  • Start date Start date
I

iamnu

Private Sub Worksheet_Change(ByVal Target As Range)
' Do Something
End Sub

I have the above code in Sheet1 of my Workbook. When I Insert a new
Worksheet, I want the code to be copied to the new Worksheet as well,
OR have the original code work in all Worksheets.

Can someone explain how?
 
Look in the ThisWorkbook module and use this
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top