Hi All!
I am in dire need of all your expert advise.
I have already searched through google and previous forums here with similar problems but none of the answers in those forums seemed to indicate why my code is not working...
I have even compared to the docs.microsoft.com example and it is identical!
I have a form with a combo box and when selecting a name in it it looks through a sheet and returns all the instances of the name.
The below code gets through the first loop and displays a name in the msgbox but then on the next line it goes bonkers at me and states:
"Error 1004 - Unable to get the FindNext property of the Range class"
Please help!!![Confused :confused: :confused:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I am in dire need of all your expert advise.
I have already searched through google and previous forums here with similar problems but none of the answers in those forums seemed to indicate why my code is not working...
I have even compared to the docs.microsoft.com example and it is identical!
I have a form with a combo box and when selecting a name in it it looks through a sheet and returns all the instances of the name.
The below code gets through the first loop and displays a name in the msgbox but then on the next line it goes bonkers at me and states:
"Error 1004 - Unable to get the FindNext property of the Range class"
Code:
Private Sub cbxName_Change()
Dim rfind As Range
Dim fAdd As String
Dim cName As String
cName = cbxName.value
With Sheets("Invoice Sched").Range("C:C")
Set rfind = .Find(cName, LookIn:=xlValues)
If Not rfind Is Nothing Then
fAdd = rfind.Address
Do
MsgBox (rfind.value)
Set rfind = .FindNext(cName)
Loop While Not rfind Is Nothing And rfind.Address <> fAdd
End If
End With
End Sub
Please help!!