We help IT Professionals succeed at work.
Get Started

Loop though slicers

1,083 Views
Last Modified: 2016-03-17
Hi,

I have code that goes through steps through slicers and prints PDFs

The code has stopped stepping throgh the slicers and i cant work out why

Sub Print_PDF_Managed_Sector()
'
' Print_PDF Macro
'

'
Sheets("PCM Sales Manager Dashboard").Select



FileMonth = Format(ActiveSheet.Range("C23"), "mmm-yy")

  If ActiveSheet.Range("C92") = "0" Then
  
  Else

 Dim Start As Single
Start = Timer
'wait 0.5 secs as some graphs do not update quick enough
Do While Start + 0.1 > Timer
    DoEvents
Loop



ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
            "R:\abc\Monthly_Outputs\Horis Reporting\" & FileMonth & "\Output\" & ActiveSheet.Range("Q6").Value & " - " & ActiveSheet.Range("I6").Value & " - " & ActiveSheet.Range("E1") & " (" & FileMonth & ") - Managed .pdf" _
        , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
        :=False, OpenAfterPublish:=False
        
        
        Sheets("Sales Manager Dashboard").Activate



End Sub

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Top Expert 2016
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE