Share via

Excel Slicer Loop VBA

Anonymous
2016-01-24T03:57:36+00:00

I am using Excel 2010.  My problem is this:  

  • I have slicer that is connected to 3 sheets.
  • I would like to click on a slicer called a Dept and save the 3 sheets as a filename .pdf.

I recorded a macro that worked perfectly, the problem I am having is this when I run the macro a week after, I get this:

 #GETTING_DATA #GETTING_DATA #GETTING_DATA 0.00% #GETTING_DATA .  

My hunch is either I do not have a line in my VBA to take care of slicers that do not have data or I need some kind of a code to loop and clear the slicer cache anytime a I click on a slicer value.   By the way the first report with data runs perfectly.

Below is the code I am using.

Sub MonthlyPDFs()

'

' MonthlyPDFs Macro

'

'

Sheets("PIVOT_cube").Selec

ActiveWorkbook.SlicerCache

Thanks

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2016-01-31T11:51:35+00:00

    Please abandon the question.

    Thanks

    Was this answer helpful?

    0 comments No comments