Simon Phillips
October 16th, 2001, 10:35 AM
Can anyone PLEASE help with what I am sure is a simple problem! I have a VB6 project where the initial form is called 'menu.frm'. In the 'General Declarations' section of this form I have the following lines :
option Explicit
public superpass as string
In the 'Form Load' event of 'menu.frm' I assign a value of "test" to 'superpass'. If I reference 'superpass' within any code inside 'menu.frm' I get the correct contents (The string "test"). If I reference 'superpass' from code inside another form in the same project it is empty!! Please help - I want to be able to create a global variable at the start of my program that is available anywhere.
option Explicit
public superpass as string
In the 'Form Load' event of 'menu.frm' I assign a value of "test" to 'superpass'. If I reference 'superpass' within any code inside 'menu.frm' I get the correct contents (The string "test"). If I reference 'superpass' from code inside another form in the same project it is empty!! Please help - I want to be able to create a global variable at the start of my program that is available anywhere.