G
Guest
Hi everyone
I want to know how I can use global variables - so that a sub in one module can communicate with a sub in a different module. I suspect that the word "static" might have the answer.
Currently I'm using a class called GlobalStuff to hold my global variable - name. I then use class2 to set name to a string. In class3 I want to be able to extract the value class2 put into GlobalStuff - but when I reference GlobalStuff I have to create a new instance, and the variable is reset to empty
The point of this is to build a control to close a report - my client has an aversion to the "x" button on the window for some reason
Any help gratefully received...
I want to know how I can use global variables - so that a sub in one module can communicate with a sub in a different module. I suspect that the word "static" might have the answer.
Currently I'm using a class called GlobalStuff to hold my global variable - name. I then use class2 to set name to a string. In class3 I want to be able to extract the value class2 put into GlobalStuff - but when I reference GlobalStuff I have to create a new instance, and the variable is reset to empty
The point of this is to build a control to close a report - my client has an aversion to the "x" button on the window for some reason
Any help gratefully received...