vba doesn't trap errors?
excel 2000/vba
i had some code like this:
select case passedVariable
case "someText" or someVariable & "someText"
but no matter what value was passed the above case always executed!!!
so then tried it in vb6.0 and the 'or' statement generated a type mismatch
error
so then in the vba code i tried
case "someText" , someVariable & "someText"
replacing the 'or' with the ',' (comma) seems to work ok
so it seems the bad syntax of using 'or' in the case statement just caused
faulty program execution instead of trapping an error????
if this is so, is there some way to turn on error trapping, or test to find
syntax and/or other programming errors
|