You can use functions to return values. Millz example is a good way of simplifying your code without going to a function, but if you were to, then you could use a boolean variable in your main sub, and then use it to call the function. For example you use a variable "test" in your main routine, and it is dimmed as a boolean.... then you have a function that does the analysis, and returns a boolean value:
in main sub: test = function_that_checks(value_to_check)
then the function looks something like:
sorry it is not a very elaborate example, but is hopefully enough to illustrate the point?
Bookmarks