Public Enum not accessible in class
I've declared an Enum in a module called Globals as follows:
VB Code:
Public Enum PowerSupplies As Integer
Remote
Panel5V
Panel24V
End Enum
I'm trying to use this in a property in a public class (called 'CANN' as follows:
VB Code:
Public Property PowerSupply() As PowerSupplies
Get
Return mPowerSupply
End Get
Set(ByVal PowerSupply As PowerSupplies)
mPowerSupply = PowerSupply
End Set
End Property
I get an error - "'PowerSupply cannot expose a Friend type outside of the public class 'CANN'".
Does anyone have any idea why this doesn't work for me? If I declare the Enum inside the class it's fine, but it doesn't seem to work with it declared (even as Public) in another module.