Macro to add cumulative total

C

Chance

I have a button that copies and pastes the new sheet at
the end of the workbook. There is a cell lets say "H6"
that is a cumulative total of all sheets. Is there a way
to have a script added so it would take the total of the
active sheet("H5") plus the total of "H6" from the sheet
before it? The following is the script used to create the
new ticket.

Sub Button141_Click()
'
' Button141_Click Macro
' Macro recorded 1/24/2003 by CHANCE
'

'
Sheets(" Master").Copy Before:=Sheets("Employees")

' After:=Sheets(ActiveWorkbook.Worksheets.Count)
ActiveSheet.Range("AO3").Value = "Enter Date"
ActiveSheet.Range("K7").Value = "Enter Well Number"
MsgBox ("Please Change The DATE & WELL NUMBER. Thank
You & Stay Safe! Remember You Can ONLY Use - For Date
Entries")

Thanks,
Chance
 
T

Tom Ogilvy

Sub Button141_Click()
'
' Button141_Click Macro
' Macro recorded 1/24/2003 by CHANCE
'

'
Sheets(" Master").Copy Before:=Sheets("Employees")

' After:=Sheets(ActiveWorkbook.Worksheets.Count)
ActiveSheet.Range("AO3").Value = "Enter Date"
ActiveSheet.Range("K7").Value = "Enter Well Number"
Activesheet.Range("H6").Formula = "=H5+'" & Activesheet.Previous.Name _
& "'!H6"
MsgBox ("Please Change The DATE & WELL NUMBER. Thank
You & Stay Safe! Remember You Can ONLY Use - For Date
Entries")
 
Top