chergh
blah
- Local time
- Today, 01:47
- Joined
- Jun 15, 2004
- Messages
- 1,414
Hey folks,
I'm having a play around with class modules and one of the things I am wanting to do is add some constants.
So I have a property called 'volume' and I would like the only values that can be assigned to this property to be "Gen1", "Gen2" ... "Gen6" but I'm struggling to find any information on constants and classes anyone got some experience of this or able to point me towards a place with some good info.
I'm thinking in the class module itself I will need something like:
So I now have some constants but how do I relate them to the property?
I'm having a play around with class modules and one of the things I am wanting to do is add some constants.
So I have a property called 'volume' and I would like the only values that can be assigned to this property to be "Gen1", "Gen2" ... "Gen6" but I'm struggling to find any information on constants and classes anyone got some experience of this or able to point me towards a place with some good info.
I'm thinking in the class module itself I will need something like:
Code:
private enum VolConsts
gen1 = 20
gen2 = 40
gen3 = 60
gen4 = 80
gen5 = 100
end enum
So I now have some constants but how do I relate them to the property?