Excel error 1004 'No cells were found '
<p>So, this throws up error 1004, no cells were found, they way i have handled the errors dont seem to work. Is there anyway i can avoid that error? Thanks!</p>

<pre><code>Private Sub ComboBox1_Enter()

On Error Resume Next
Dim rrange As Range
Dim VisibleRange As Range
Dim rcell As Object

Set rrange = Sheets("Project details").Range("A2:A150")

Dim byCSMCoprId As String 'corp id goes into criteria for autofilter.
byCSMCoprId = TextBox1.Text
On Error GoTo Error_Handler
With Sheets("Project details").Range("A1:M1")
    .autofilter field:=2, Criteria1:=byCSMCoprId
    .autofilter field:=7, Criteria1:=""
End With
Set VisibleRange = rrange.SpecialCells(xlCellTypeVisible)
For Each rcell In VisibleRange
        ComboBox1.AddItem rcell
Next
Error_Handler:
If Err.Number = 1004 And Err.Description = "No cells were found." Then GoTo Message:

Message:
    MsgBox "No cells were found"
End Sub
</code></pre>