Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It has been explained to you already why you cannot use evaluate.
Keep it simple and use say a case statement Enum Periodicity Weekly = 52 Monthly = 12 Yearly = 1 End Enum Select Case UserInput Case "Weekly": Res = Weekly Case "Monthly": Res = Monthly Case "Year": Res = Yearly End Select -- __________________________________ HTH Bob "Tetsuya Oguma" wrote in message ... Hi everyone, Thanks for Joel and Sheeloo for my previous post. I want to now concatenate a name of enum item and get its value. So, an example is: Enum Periodicity abcWeekly = 52 abcMonthly = 12 abcYearly = 1 End Enum The reason why I want to do this is 1) get user input of "Monthly" and 2) add a prefix of "abc" to get a value of "12"! How can I do that? I tried Application.Evaluate("abc"&"Monthly"), but in vain... Thanks in advance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Get an enum value assigned | Excel Programming | |||
help with finding a concatenated string | Excel Programming | |||
Bold a portion of concatenated string | Excel Discussion (Misc queries) | |||
specify range name in formula with concatenated string | Excel Worksheet Functions | |||
programmatic generation of Enum To String functions | Excel Programming |