Oke, I resolved the bug. That means when I use following public function ValueOneBack, I don't get the error 424 anymore. But it doesn't make my function MatchOneBack work the way it has to. But that's another question..
VB Code:
Public Function ValueOneBack() As Variant ValueOneBack = "" Application.Volatile If TypeName(Application.Caller) = "Range" Then If Application.Caller.Row <> 65536 And Application.Caller.Column <> 1 Then ValueOneBack = Application.Caller.Offset(1, -1).Value End If End If End Function Function MatchOneBack() As Integer Dim LookupValue As Variant Dim rngMatrix As Range LookupValue = ValueOneBack() Set rngMatrix = Worksheets(1).Range("B1:B4") If rngMatrix.Find(What:=LookupValue, _ LookIn:=xlValues, _ LookAt:=xlWhole, _ MatchCase:=False) Is Nothing Then MatchOneBack = 0 Else MatchOneBack = 2 End If Set rngMatrix = Nothing End Function




Reply With Quote