Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to define a range in VB? For example, define a between 1 and 100, and a is an integer? I don't know much about VB
How to define a range in VB? For example, define a between 1 and 100, and a is an integer? I don't know much about VB
It seems that there is no form of defining the range of variables as you said, only the types of variables are defined as ~ integer -32 32,768 to 32,767, long integer -2,147,483,648 to 2,147,483,647 and so on.

If you want to limit the range of variables, you can only write your own code restrictions.

If a>= 100, then a= 100. In this way, A can never exceed 100.