Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return value of Property Get when using enumerated type
Not sure if there's any help available for this one!
In a class module named PlayingCard I have: public enum enumColour CdRed = 1 CdBlack = 2 end enum private mColour as string property let CardColour(byval clntColour as enumcolour) select case clntColour case CdRed,CdBlack mColour = clntColour case else 'error trapping goes heer end select end property property get CardColour() as enumColour CardColour = mColour end property Then in a standard module: dim NewCard as PlayingCard Sub CheckitOut set NewCard = new PlayingCard With NewCard .cardcolour = CdRed end with debug.print "The Cards colour: " & newcard.cardcolour end sub What I'm left with in the immediate window is: The Cards colour: 1 But what I want returned in the immediate window is The Cards colour: CdRed Am i doing something wrong? or is there no way around this using the above code. Any help greatly appreciated Jason |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return value of Property Get when using enumerated type - HELP!!
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return value of Property Get when using enumerated type - HELP!!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Property Let: assign return value of Double when passing String | Excel Discussion (Misc queries) | |||
Type in letter return word | Excel Worksheet Functions | |||
Enumerated constants defined where? | Excel Programming | |||
Using Property Let with a Type as member of a Class | Excel Programming | |||
How to find what object type is returned from Selection property ? | Excel Programming |