Darren Smith
Well-known Member
- Joined
- Nov 23, 2020
- Messages
- 631
- Office Version
- 2019
- Platform
- Windows
This code says on Criteria Name Argument not found??
Can anybody say why?
Can anybody say why?
VBA Code:
Private Sub Filter_Jobs_By_Months_Click()
Dim Database(1 To 100, 1 To 15)
Dim My_Range As Integer
Dim colum As Byte
Dim ws As Worksheet
Application.ScreenUpdating = False
Set ws = ThisWorkbook.Worksheets("TGS JOB RECORD")
On Error Resume Next
ws.Range("A2").AutoFilter Field:=11, Criteria:=Me.Months.Value
For i = 2 To ws.Range("A10000").End(xlUp).Row
If ws.Cells(i, 11) = Me.Months Then
My_Range = My_Range + 1
For colum = 1 To 15
Database(My_Range, colum) = ws.Cells(i, colum)
Next colum
End If
Next i
Me.WIPMonthly.List = Database
Application.ScreenUpdating = true
Exit Sub