Public Variable Question

D

Daniel

What event will reset a public variable that I have set?
I am trying to maintain the username through a public
variable. When I hit stop when debugging it resets the
username. Are there any other events that might reset
that for which I should plan? Or as long as the user does
not happen into debug mode there should be no problem?

Thanks

Daniel
 
A

Allen Browne

It resets only when you stop, so this should not happen in production, but
it does make it hard when developing and debugging. In the final product,
you should not have any unhandled errors, so the issue does not arise.

One workaround is to create another boolean variable. Set it to True in your
initialization routine, and if it's false you need to run init. again.

Another is to use text boxes on a hidden form. If you need a hidden form to
simulate an application close, that's a workable concept.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top