As per help file, do your code comply to this fact?
RetVal Variant Optional.
The action's return value. The value can be a string or number, but it must be a constant value. It cannot be the name of a variable. The value is returned to the statement that called the action.