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

Re: Variables like Booleans 80 80

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  
Re: Variables like Booleans 80 80

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....

Re: Variables like Booleans 80 80

You can even store string values to the enum variables.

Re: Variables like Booleans 80 80

String values are possible using attributes not directly.

Re: Variables like Booleans 80 80

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.