wk6pack <wk***@sd61.bc.ca> wrote:
I was wondering why when I declare the dim variable outside the try
statement, I could use the .dispose() function but when I declare it inside
the try statement, I get Name 'varname' is not declared.
Where are you trying to use it? In the finally block? If so, that's the
problem - the scope of the try block is just the try block, and with
good reason: the code execution might not have even reached the place
where your variable is declared before an exception is thrown.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too