'<variablename>' is not a local variable or parameter, and so cannot be used as a 'Catch' variable
Variables in Try...Catch...Finally statements must be declared locally, or be parameters for the current procedure.
Error ID: BC31082
To correct this error
- Declare local variables or parameters for Try...Catch...Finally statements.