Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set values for class property

Status
Not open for further replies.
May 30, 2002
78
US
Hi everyone,

I have a class with only one property, "source". There are only 4 values that source can be....

Is there anyway to restrict setting the property to false values? Or is there a way to get the VB drop down box that displays valid selections during design time?

Thanks, let me know if you need more info.

MG
 
Look up Enum statement in VBHelp

I tried this in a Module:

Code:
Public Enum myNUm
myOne = 1
myTwo = 2
End Enum

Then in a form (eg Click event)
Code:
Dim fred As myNUm
fred = myOne
MsgBox fred

as you type in the line 'fred = ' intellisense picks up available values Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top