Could anybody help me out here? I just started working with Visual Basic 2005 and i have a problem in achieving a certain result through codes.
In a project with multiple forms(including dialog forms) ,which can be called upon from one main form; I declared a variable in the code view of the main form and initialized it to zero because i would refer to it from the other forms and also perform some cummulative additions to it. The problem i have now is that after declaring the variable at the top of the code module on the main form;
Public intScore As Integer = 0
When i want to use this variable to perform some aritmethic operations on other forms within the same project i keep getting a warning statement;
"variable is used before it has been assigned a value; a null reference exception could result at runtime "
so i guess my problem is either how to link the forms with one another since i 'think' my declaration snippet above is appropriate or something else is missing or wrong.
Please i would appreciate it if anyone can help me out. i'm online most attimes so you could holla.
onochie_online@yahoo.co.ukOr txt me i could reach back- 07035224890