Referring directly to specific Forms in a Module? You deserve it to go wrong frankly! Horrible, horrible design. And what the heck is Imports WindowsApplication1.SettingsForm supposed to be about (especially since you then apparently forget you did it later in the code)?!
In any case, if you have the values in Textboxes what the heck do you need variables for anyway? The whole thing lacks logic.
As far as I can see the main problem is that you're assigning global variables with values that depend on external initialisations that may not have actually taken place. Having the declarations at the bottom of the code does not mean that they will be executed after the Subs that precede them. Variables declared in a module should only be initialised with values if said values are literal ( = 9, = "some stuff") in my opinion. To do otherwise is simply flirting with trouble.




Reply With Quote
