Declaring a variable so that it can used in the whole form
Author |
Message |
strygwyrm
|
Posted: Mon May 12, 2008 9:56 am Post subject: Declaring a variable so that it can used in the whole form |
|
|
hi,
I was wondering if there was a way to declare variables in a way so that they could be used through out a whole form. In an instance like this one variable should continue onto the next object (button). I saw some tutorials on the Microsoft website about shared decelerations but they were too advanced for my understanding.
The reason i need this is that i am working on a dice game with two different buttons for two players and another button to compare the scores. I would like to have different variables declared in each button and calculated there. and then these variables should be carried on to the compare button so that the program could determine the winner.
Thanks in advance |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
pkjr92
|
Posted: Thu Jul 24, 2008 11:04 pm Post subject: Re: Declaring a variable so that it can used in the whole form |
|
|
Use "Public"
ex.
Normal = Dim Var1 As String
Public = Public Var1 As String |
|
|
|
|
![](images/spacer.gif) |
|
|