koi
Member
Hi Admin,
can we have like sticky post that collect all simple / good macro that we can save it as our personal macro?
i can start with myself i have 2 macros in personal book.
-- this is to disable page break--
Sub disablePageBreaks()
ActiveSheet.DisplayPageBreaks = False
End Sub
-- this is to change count of in pivot table to sum of --
Sub SumAllValueFields()
Dim pt As PivotTable
Dim pf As PivotField
Dim ws As Worksheet
Set ws = ActiveSheet
Set pt = ws.PivotTables(1)
Application.ScreenUpdating = False
pt.ManualUpdate = True
For Each pf In pt.DataFields
pf.Function = xlSum
Next pf
pt.ManualUpdate = False
Application.ScreenUpdating = True
Set pf = Nothing
Set pt = Nothing
Set ws = Nothing
End Sub
can we have like sticky post that collect all simple / good macro that we can save it as our personal macro?
i can start with myself i have 2 macros in personal book.
-- this is to disable page break--
Sub disablePageBreaks()
ActiveSheet.DisplayPageBreaks = False
End Sub
-- this is to change count of in pivot table to sum of --
Sub SumAllValueFields()
Dim pt As PivotTable
Dim pf As PivotField
Dim ws As Worksheet
Set ws = ActiveSheet
Set pt = ws.PivotTables(1)
Application.ScreenUpdating = False
pt.ManualUpdate = True
For Each pf In pt.DataFields
pf.Function = xlSum
Next pf
pt.ManualUpdate = False
Application.ScreenUpdating = True
Set pf = Nothing
Set pt = Nothing
Set ws = Nothing
End Sub