State() as Integer
or
State() as CclEPIStates
Constants are available in the type library. Use the Visual Basic Object Browser to view them.