i have a function that returns a string
on error, i would like it to return a specific value. how do i do this?
i have a function that returns a string
on error, i would like it to return a specific value. how do i do this?
Use On Error GoTo
to branch to a specific label if an error occurs:
Function YourFunction() {
On Error GoTo ErrorLabel
... your code ...
Exit Function
ErrorLabel:
YourFunction = yourspecificvalue
}