Hi,

I am pretty new to arrays in VBA, as in I'm having a little trouble understanding how they work. I have been trying to find other forum threads which might have a similar issue/solution to my problem, but only managed to piece together only some of the parts.

The following is the code I am trying to work on:

Dim AUWS() As String
Pointer = 0
AUWS(Pointer) = Worksheets("B1").Name

    For Each Worksheet In Sheets(Array("B2", "B3", "B4", "B5", "B6", "B7", "B8"))
        If Sheets("AT").Range("O" & 38 + Pointer).Value <> "Not Applicable" Then
            Pointer = Pointer + 1
            ReDim Preserve AUWS(0 To Pointer)
            AUWS(Pointer) = Worksheet.Name
        End If
    Next Worksheet

Sheets(AUWS).PrintPreview
The following is a description to better understand the coding:
(1) B1 to B8 are all worksheets.
(2) B1 worksheet should always be print previewed.
(3) B2 to B8 should only be print previewed based on the conditions found in sheet AT - Range O38 till O44 (a total of 7 cells)
(4) If, within ranges explained in note (3), the values include "Not Applicable" then such worksheet should not be included in the array to be print previewed.

If anyone has any ideas, help is always appreciated.

Many Thanks!!!