0

I tried to record a macro to save screenshots of a selected area from my Pivot table using different filters.

But when I tried to re-run, it didn't return any pictures. Is there a way I can create and save snapshots (and save as picture without links), so that whenever I change the filter, it creates another snapshot of the same area?

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Dragon Warrior
  • 53
  • 1
  • 1
  • 12
  • 1
    Possible duplicate of [Excel macro to take a screenshot of specific cells and save as image file](https://stackoverflow.com/questions/39712856/excel-macro-to-take-a-screenshot-of-specific-cells-and-save-as-image-file) – Pᴇʜ Jul 10 '19 at 07:02
  • @Pᴇʜ: Thank you for your kind feedback! May I ask if the solution you had posted also works on Pivot Table? Or the coding needs to be changed slightly in VBA? Pardon my inexperience with VBA programming with Pivot tables. Your feedback is greatly appreciated! Thank you :) – Dragon Warrior Jul 10 '19 at 08:46
  • 1
    If you exchange `Range("G3:J14")` by `ActiveSheet.PivotTables(1).TableRange1` (pivot range without the filter area) or `ActiveSheet.PivotTables(1).TableRange2` (whole pivot table area), then the linked code should work. – Asger Jul 10 '19 at 10:32
  • Thank you @Asger! Appreciate your comment. Let me try that out :) – Dragon Warrior Jul 11 '19 at 02:55
  • 1
    The above linked answer may not work for PivotTables, as the added Chart may be a PivotChart. Then it is not blank and the pasted picture has an additional PivotChart background. Please see my answer [here](https://stackoverflow.com/a/57114187/10908769) instead. – Asger Jul 19 '19 at 14:25

0 Answers0