0

Hi,
I would like to know how to create variables like booleans

When you type a boolean command it look like this

Dim Boo as Boolean
Boo = True
False
and then you select one

Can this style of preset entries be done for Other Custom Variables

i.e.
Dim Height as Size
Height = Small
Medium
Large

Thanks
Peter

3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by ptaylor965
0

I have found my own answer

'Size Options  
Public Enum Size  
     Small = 0  
     Medium = 1  
     Large = 2  
 End Enum  
  
 Dim PictureSize as Size  
 PictureSize = Small  
             Medium  
             Large  
  
 'and they return  
'   Small = 0  
'   Medium = 1  
'   Large = 2  
0

or else,
Try using select statements-
dim a as boolean
select a
case 0
request.write("its true")
case 1
request.write("its false")
end select
happy programming....

0

Using "Public Enum" looks like the best
method for setting selectable FIXED options
like SIZE(Small, Medium, Large)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.