Question: ```
Sub test()
    Dim Relevant_Sheets As Variant
    Set Relevant_Sheets = Sheets(Array("btw.facturen", "btw.filelist", "btw.controle", "intervat", "voorblad", "medecontractanten", "Vak 01", "Vak 03", "Vak 45", "Vak 54", "Vak 55", "Vak 56", "Vak 59", "Vak 81", "Vak 82", "Vak 83", "Vak 84", "Vak 85", "Vak 86", "Vak 88"))
    Number_of_Relevant_Sheets = 20
End Sub

```

This is an extract of my code. `Relevant_Sheets` gets used multiple times afterwards, and I use it so that I only have to set which pages to use once.

I would like `Number_of_Relevant_Sheets` to count the number of sheets in `Relevant_Sheets` (in this case 20), so that I don't have to manually change it when I add or remove a sheet from the list.

If anyone could point me in the right direction?

Answer: 
You can use `Relevant_Sheets.Count` instead of `Number_of_Relevant_Sheets`
Maybe I went a little "overkill" here, but I would go with something like the code below (so you can use all variables and objects later in your code):

```
Option Explicit

Sub test()

    Dim Relevant_Sheet()    As Worksheet
    Dim SheetNameArr        As Variant
    Dim Number_of_Relevant_Sheets As Long
    Dim i As Long

    SheetNameArr = Array("btw.facturen", "btw.filelist", "btw.controle", "intervat", "voorblad", "medecontractanten", "Vak 01", "Vak 03", "Vak 45", "Vak 54", "Vak 55", "Vak 56", "Vak 59", "Vak 81", "Vak 82", "Vak 83", "Vak 84", "Vak 85", "Vak 86", "Vak 88")
    Number_of_Relevant_Sheets = UBound(SheetNameArr) + 1 '<-- add 1 because the array start at 0
    ReDim Relevant_Sheet(0 To UBound(SheetNameArr)) ' <-- resize worksheet array

    For i = 0 To UBound(SheetNameArr) ' <-- loop though all elements in the array, and set the relevant sheet
        Set Relevant_Sheet(i) = Sheets(SheetNameArr(i))
    Next i

End Sub

```