: Hello,
:
: I need to access variables from multiple forms so
: I asked someone the above and got this answer:
:
: Put the array, and other global variables in a class with shared
: properties. That way each form can read and write to the array, but
: the two forms don't have to know about each other.
:
: So! How do I Put the global variables in a class with shared
: properties?
:
:
The way I've done this and it works perfectly for me. 1. Create module, 2. place the variables in the module like so:
Module Modudle1
Public Answer As DialogResult
Public Brofrm, Scanfrm As Boolean
Public x, GetErec, Records, xx, u, TabID, SHeight, SWidth As Integer
Public SecureLevel, logn, Reportname, DateName, theFile As String
Public SumObject, Mydate As Object
PS you can also place subs and function here that can be used from any form such as
Public Sub's and Public Functions.... You don't have to place them within each form but this way they are available to the entire project.... Good luck with your coding.