locked
Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4")).Select RRS feed

  • Question

  • Hello,

    i need to print all sheets with "- PP".

    Sheets(Array("Sheet1 - PP", "Sheet2", "Sheet3 - PP", "Sheet4")).Select

    Sheets(Array("* - PP")).Select

    thanks for your help,

    Friday, May 10, 2019 9:38 PM

Answers

  • Stortebeker
    re: print certain sheets

    Sub PrintCertainSheets()
    Dim pSht As Excel.Worksheet

    For Each pSht In ThisWorkbook.Worksheets
      If VBA.InStr(1, pSht.Name, "PP", vbTextCompare) > 0 Then
         pSht.PrintOut
      End If
    Next
    End Sub
    '---

    Custom_Functions add-in (19 new functions)
    Download from MediaFire...
    • Marked as answer by Störtebeker Sunday, May 12, 2019 6:12 PM
    Saturday, May 11, 2019 1:09 AM