• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

personal macro collection

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
 

Luke M

Excel Ninja
Hi Koi,

As we all have different backgrounds, it makes sense that we might all have different subs. There's a plethora of good macros stored in the vault forum.
 
Top