I'm trying to sort a date column by a range of dates found in a column of another sheet. I feel like my issues is with my weak understanding of populating arrays. Am I declaring and populating the array "Arraystring" correctly? If so why am I not able to autofilter the date column I need to.
Code:
Private Sub Click_Generate_Click()Dim Arraystring(30) As String
If IsNull(ListBox_Month.Value) Then
MsgBox ("Please select a month")
Else
Mon = ListBox_Month.Value
Select Case Mon
Case "January"
Case "November"
For i = 2 To 29
Sheets("Dates").Activate
Arraystring(i) = Cells(i, 8).Value
Next i
Windows("FY18 SH DAILY ANALYTICALS.xlsx").Activate
ActiveSheet.ListObjects("Table5").Range.AutoFilter Field:=1, Criteria2:=Arraystring, Operator:=xlFilterValues
Case "December"
FilterMonth = Sheets("Dates").Range("B12").Value
End Select
Last edited: