View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keeena keeena is offline
external usenet poster
 
Posts: 21
Default VBA Code runtime error only after opening Locals window

One more tidbit of info...

If I place a statement right before the end of the routine (e.g.
debug.print "Junk"), this statement will be executed prior to the Error
91. So the error is thrown after all my code has run.

I explicitly dereference all objects prior to this debug.print
statement. So the error is being thrown when VBA is performing its own
stuff (cleanup?) behind the scenes at or after the End Sub statement.
Why is this happening and how could I debug this further?

TIA,
-K