Hi all
I'm a novice with VBA and am trying to understand what this section of code means and what it actually does. I know the end result is that it is used to set the range for filtering from a list.
This part I don't need explained, but am including for reference.
I'm a novice with VBA and am trying to understand what this section of code means and what it actually does. I know the end result is that it is used to set the range for filtering from a list.
Code:
Dim wbBudget As Workbook
Dim wbOSR As Workbook
Dim Criteria_Proj(100) As String
Dim FirstRow As Integer
FirstRow = 1
While wbBudget.Sheets("Filter Lookup").Cells(FirstRow + 1, 2) <> ""
Criteria_Proj(FirstRow) = wbBudget.Sheets("Filter Lookup").Cells(FirstRow + 1, 2)
FirstRow = FirstRow + 1
Wend
This part I don't need explained, but am including for reference.
Code:
wbOSR.Sheets(1).Range("Table1").AutoFilter Field:=6, Criteria1:=Criteria_Proj, Operator:=xlFilterValues
Last edited: