I'm getting a type mismatch (at the line with lookup function) in the following section of code:
Dim JobArray(1 To 85, 1 To 2) As String
Set JobSource = Worksheets("Data").Range("A")
'Populate the array with all the job numbers
x = 0
y = 1 'so the 1st cell looked at is A2, A1 has title.
Do While x < 85
x = x + 1
y = y + 1
JobArray(x, 1) = Worksheets("Data").Cells(y, 1) 'Job Number
JobArray(x, 2) = Worksheets("Data").Cells(y, 2) 'Job Name
Loop
For Each z In JobArray
If Application.WorksheetFunction.VLookup(JobArray(z, 1), JobSource, 16, False) = "All" Then
AnalCodesUF.JobNumberCB.AddItem
AnalCodesUF.JobNumberCB.List(0, 1) = ""
Else
End If
Next
any ideas?
Dim JobArray(1 To 85, 1 To 2) As String
Set JobSource = Worksheets("Data").Range("A")
'Populate the array with all the job numbers
x = 0
y = 1 'so the 1st cell looked at is A2, A1 has title.
Do While x < 85
x = x + 1
y = y + 1
JobArray(x, 1) = Worksheets("Data").Cells(y, 1) 'Job Number
JobArray(x, 2) = Worksheets("Data").Cells(y, 2) 'Job Name
Loop
For Each z In JobArray
If Application.WorksheetFunction.VLookup(JobArray(z, 1), JobSource, 16, False) = "All" Then
AnalCodesUF.JobNumberCB.AddItem
AnalCodesUF.JobNumberCB.List(0, 1) = ""
Else
End If
Next
any ideas?