Zydeceltico
Registered User.
- Local time
- Today, 12:39
- Joined
- Dec 5, 2017
- Messages
- 843
Hi All -
I find myself passing the same 3 values under the same conditions over and over so I am considering creating public variables that I can call whenever I want to use that value instead of referencing forms as I have been which gets cumbersome sometimes.
My question - -after I have used a public variable in a form, saved the form, closed the form, and moved on to a new situation and want to use the public variable again in a different form or circumstance, is there some boilerplate code that I can use at the top of my sub or function that makes sure that the public variable I am calling does not have a value in it already?
Is it something like:
Thanks!
Tim
I find myself passing the same 3 values under the same conditions over and over so I am considering creating public variables that I can call whenever I want to use that value instead of referencing forms as I have been which gets cumbersome sometimes.
My question - -after I have used a public variable in a form, saved the form, closed the form, and moved on to a new situation and want to use the public variable again in a different form or circumstance, is there some boilerplate code that I can use at the top of my sub or function that makes sure that the public variable I am calling does not have a value in it already?
Is it something like:
Code:
Private Sub Form_Load()
myPublicVariable = ""
End Sub
Thanks!
Tim