Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding macro to worksheet

Status
Not open for further replies.

angiem

MIS
Sep 29, 2000
116
CA
I have a worksheet that when a button is selected creates a new worksheet. Then when the user changes a value on the new worksheet it retotals the columns. I know I can use the worksheet_change to achieve this, just don't know how to program it to do it on each new worksheet. Any ideas?
 

Use the workbook_sheetchange event:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

You can limit the events to certain sheets with conditional statements on Sh.Name.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top