|
-
September 22nd, 2001, 12:37 PM
#1
Variable Help ???
I am trying to write a code statement that will create a variable called total to be used in multiple subroutines with a data type of short. thanks
-
September 23rd, 2001, 09:50 PM
#2
Re: Variable Help ???
The variable type should be either byte or integer
Byte : An integer value between 0 and 255
Integer : A value in the range -32,768 to 32,767
The scope of the variable depends on the task that u want to perform with those variables.
* If all subroutines u want to use the variable are in a single form(or in a single module)
- u can define within the subroutines and pass as parameters
- u can define in the general declaration area of the form (or in the module) in the following format Dim iTotal as Integer
* If all subroutines u want to use the variable are in different forms (or in different modules/forms)
- u can define within the subroutines and pass as parameters
- u can define in the form (or in the module) in the following format public iTotal as Integer
Whenever used, use it with the form name in the first part (in the case of defined in the form)
Eg. Form1.iTotal = 17
IS THIS ENOUGH?
Srinika
If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|