I have defined an enum that I need to catch from string input
What I am attempting to do is catch the CurrentUser and assign a number value to them I figured this would be the easiest way (not sure now) or a least a way to cut down my code.
I can referrence the enum by using logins.css for example to return 9 but how do I use my input string to select an enum value?
how do I get the quotes of a string for example I believe in VB there is the [enum].parse(typeofenum, value) method but not it wopuld seem in VBA.
any help welcome of course.
redapples
Want the best answers? See FAQ181-2886
Code:
Private Enum logins
cmsadmin = 0
clifton = 1
margaret = 2
craig = 3
summer = 4
cygent = 5
stopover = 6
wernham = 7
fonthill = 8
css = 9
trinity = 10
urquhart = 11
icds = 12
admin = 13 'here only for testing
End Enum
I can referrence the enum by using logins.css for example to return 9 but how do I use my input string to select an enum value?
Code:
dim e as logins
e = logins.CurrentUser() 'does not work
any help welcome of course.
redapples
Want the best answers? See FAQ181-2886