How do I make a variable usable in multiple forms in Visual Basic 6?
wohawsnng asked:
Let say in Form1 the user chooses a text file, file A, to open containing the path of another file, file B. Then he will click a command button which opens file B in another form, displaying the text in the file in a text box.
yes I mean file A contains the path to file B
How do I use a module to do this?
Let say in Form1 the user chooses a text file, file A, to open containing the path of another file, file B. Then he will click a command button which opens file B in another form, displaying the text in the file in a text box.
yes I mean file A contains the path to file B
How do I use a module to do this?

don’t understand the question
do you mean file A contains the path to file B ?
Use a module. A module in VB6 is essentially common code that can be referenced by all classes & forms within your project.
There are three ways of doing this.
When you Define Form 2, set the Tag command with the value.
or
When you define Form 2 put the value in the New Parameters list
or
Define the Variable as Public in Form 2, after it is defined move the value to the variable.
You will find the answer here