Problem returning an enumerated type from a property

R

Rob Richardson

Greetings!

I have a module that contains the following:
Module Globals
Public thePortfolio As clsPortfolio
Public Enum OrderResult
ORDER_FAILED
ORDER_GOOD
ORDER_PENDING
ORDER_CANCELED
End Enum
End Module

I have class that contains the following property:

Property Result() As OrderResult
Get
Return m_result
End Get
Set(ByVal Value As OrderResult)
m_result = Value
End Set
End Property

I am getting an error message saying "'Result' cannot expose a Friend type
outside of the class 'clsOrder'". The help message for the error says that
I should make my type Public. But, as near as I can tell, the type IS
public!

What am I leaving out?

Thanks again!

Rob
 
M

Mattias Sjögren

Rob,
I am getting an error message saying "'Result' cannot expose a Friend type
outside of the class 'clsOrder'". The help message for the error says that
I should make my type Public. But, as near as I can tell, the type IS
public!

What am I leaving out?


The Globals module isn't public by default.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top