>Methods and events cannot contain nested procedures or class definitions. it gave me that error when i place the code in a command button.
Don't place it in the command button but call from it or comment out FUNCTION statement and set tcCursorName variable.
--sb--