Hello all,
I have been experiencing an undue amount of difficulty in applying various solutions to the problem I gave in the title.
To be clear, I am trying to find the first occurrence of a "0" in column F and keep receiving a "Run time error 91" erroe. I have made multiple attepmts at using solutions that people have posted on many sites, including this one. My current code is
-------------------------------------------------
Sub FindFirstZero()
Dim cell As Range
Dim FirstZero As Long
Set cell = Range("F:F").Find(What:="0", LookIn:=xlValues, _
LookAt:=xlWhole, SearchFormat:=False)
FirstZero = cell.Row
End Sub
-------------------------------------------------
and the error is being reported on the line "FirstZero = cell.Row".
I have tried using "Set FirstZero = cell.Row", but the error returned there is that an object is required...
I expect that I am missing something fundamental here as I have struggled with this type of error before. Any advice is much appreciated.
I have been experiencing an undue amount of difficulty in applying various solutions to the problem I gave in the title.
To be clear, I am trying to find the first occurrence of a "0" in column F and keep receiving a "Run time error 91" erroe. I have made multiple attepmts at using solutions that people have posted on many sites, including this one. My current code is
-------------------------------------------------
Sub FindFirstZero()
Dim cell As Range
Dim FirstZero As Long
Set cell = Range("F:F").Find(What:="0", LookIn:=xlValues, _
LookAt:=xlWhole, SearchFormat:=False)
FirstZero = cell.Row
End Sub
-------------------------------------------------
and the error is being reported on the line "FirstZero = cell.Row".
I have tried using "Set FirstZero = cell.Row", but the error returned there is that an object is required...
I expect that I am missing something fundamental here as I have struggled with this type of error before. Any advice is much appreciated.