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
|