I'm working on my xlLib UDF library, and noticed something odd.
In phase 1 of my test script, I exercise each of the functions in read and write mode, as appropriate. They all work as expected.
In phase 2, I use "bad" function parameters to verify the error handling and proper return codes.
During my test, I have an Excel workbook with two worksheets. I try to select worksheet 8 and, as expected, get an error. The problem is - any further function calls continue to return the same error, including valid calls! For example, after failing to select non-existant sheet 8, I can successfully select sheet 2 and then sheet 1, and finally delete sheet 2, but these three successful steps still return the error event from the invalid sheet selection. The error string is
COM exception error "WorkSheets" ((null) - (null)) [-2147352567/80020009]
Do I need to somehow clear the error after it occurs?
Thanks!
Glenn
_________________________
Actually I
am a Rocket Scientist!