How to catch the error? When I call "StrSpliter", from a cell, passing nothing as a parameter, I get "Object Variable Not Set".
The problem is the cell formula sometimes passes "nothing" and I get an error (or 10,000 errors, so I need to terminate office and restart)
Running "TestStrSplit" gives the same error.
Code: Select all
Sub TestStrSplit
Dim a
Dim s As String
Dim i As Integer
s = "hello OOoBasic programmers, this is another solution"
a = StrSpliter(Nothing," ")
MsgBox(join(a,chr(13))
End Sub
Function StrSpliter(byval s As String, SplitChar As String)
StrSpliter = "a"
End Function