[AccessD] Is there a simpler way?
John Colby
jwcolby at gmail.com
Tue Jul 12 17:45:47 CDT 2022
I need a text enum (colors to be specific). Enums are longs. Sigh
Public Enum enumVBColors
Black = vbBlack
Red = vbRed
Green = vbGreen
Yellow = vbYellow
Blue = vbBlue
Magenta = vbMagenta
Cyan = vbCyan
White = vbWhite
End Enum
Function fColor(intColor As enumVBColors) As String
Select Case intColor
Case enumVBColors.Black
fColor = "Black"
Case enumVBColors.Blue
fColor = "Blue"
Case enumVBColors.Cyan
fColor = "Cyan"
Case enumVBColors.Green
fColor = "Green"
Case enumVBColors.Magenta
fColor = "Magenta"
Case enumVBColors.Red
fColor = "Red"
Case enumVBColors.White
fColor = "White"
Case enumVBColors.Yellow
fColor = "Yellow"
End Select
End Function
Does the trick but DAMN! I can use these text strings as colors in the
HTML tags. But DAMN! I hate ugly and this is just ugly.
Let the slappin' commence.
--
John W. Colby
Colby Consulting
More information about the AccessD
mailing list