hI
This code below i have modified to get it to work...it does work but could it be made simpler or tidied up
Code:
Option Explicit
Sub SubTotalize()
With Sheets("XFLOW A")
.Unprotect Password:="abc"
.Range("B3:H" & .Cells(Rows.Count, 2).End(xlUp).Row).Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(2, 3, 7), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
.Protect UserInterfaceOnly:=True, Password:="abc"
End With
End Sub
Sub Subtotalize_1()
With Sheets("XFLOW B")
.Unprotect Password:="abc"
.Range("B3:H" & .Cells(Rows.Count, 2).End(xlUp).Row).Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(2, 3, 7), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
.Protect UserInterfaceOnly:=True, Password:="abc"
End With
End Sub
Sub subtotalize_2()
With Sheets("XFLOW C")
.Unprotect Password:="abc"
.Range("B3:H" & .Cells(Rows.Count, 2).End(xlUp).Row).Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(2, 3, 7), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
.Protect UserInterfaceOnly:=True, Password:="abc"
End With
End Sub
Bookmarks