vba hide array sheets code example
Example: Excel VBA hide sheets with names in array
Sheets(arr).Visible = False
'Note1: For this to work without an error, 'arr' needs to be a 1D array with a
' valid and actual sheet name in each element.
'Note2: An array cannot be used to make sheets visible if they are hidden.
' This array technique only works to hide visible sheets.