Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everyone,
Put it simply, Enum SecurityLevel IllegalEntry = -1 SecurityLevel1 = 0 SecurityLevel2 = 1 End Enum How can I get -1 of "IllegalEntry " above, provided I know "IllegalEntry"? I tried Application.Evaluate("IllegalEntry "), but in vain... Thanks, Tetsuya |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The evaluate function uses the worksheet to perform the calcualtion and the
worksheet will not recognize the enum. Simply use the enumeration a = IllegalEntry or msgbox(IllegalEntry) "Tetsuya Oguma" wrote: Hi everyone, Put it simply, Enum SecurityLevel IllegalEntry = -1 SecurityLevel1 = 0 SecurityLevel2 = 1 End Enum How can I get -1 of "IllegalEntry " above, provided I know "IllegalEntry"? I tried Application.Evaluate("IllegalEntry "), but in vain... Thanks, Tetsuya |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sample code
Public Enum SecurityL illegalentry = -1 SecurityLevel1 = 0 SecurityLevel2 = 1 End Enum Sub a() Dim slevel As SecurityL slevel = illegalentry MsgBox slevel slevel = SecurityLevel1 MsgBox slevel slevel = SecurityLevel2 MsgBox slevel End Sub 'enum can be declared as the type 'assigned any value from its members 'used as a constant with the value equal to the member assigned... -- Always provide your feedback so that others know whether the solution worked or problem still persists ... "Tetsuya Oguma" wrote: Hi everyone, Put it simply, Enum SecurityLevel IllegalEntry = -1 SecurityLevel1 = 0 SecurityLevel2 = 1 End Enum How can I get -1 of "IllegalEntry " above, provided I know "IllegalEntry"? I tried Application.Evaluate("IllegalEntry "), but in vain... Thanks, Tetsuya |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 97 Enum | Excel Programming | |||
Enum | Excel Programming | |||
Enum in Excel 97 | Excel Programming | |||
Enum in Excel 97 | Excel Programming |