Click here to Skip to main content
14,695,085 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
I have a DLL project that has several classes and a global module. The global module has a Public Enum. I have a Public Function in a class and I want the Public Enum to be a parameter in the function. But I get a blue squiggly error:

'MyEnumNameInstance' cannot expose type '[Global}.MyEnumName' outside the project through class 'MyClassName'.

At the point in the code where I declare my function:
Public Function MyFunction(ByVal MyEnumNameInstance As MyEnumName, _
                           ByVal otherParm As Integer) As Boolean
    'Function does stuff then returns boolean
End Function

Isn't that what "Public" is supposed to do? How can I make an enumeration MORE public than just declaring it Public? I don't really want to copy the enumeration across every class in my DLL. The whole point is to have one definition of the enumeration and it is used everywhere. Is there a keyword that can make it public even outside the dll?
Updated 3-Feb-15 5:58am
ZurdoDev 3-Feb-15 10:51am
What access level does your class have?
Kschuler 3-Feb-15 10:52am
[no name] 10-Jun-15 3:25am
public by nature.
ZurdoDev 3-Feb-15 10:54am
What is MyEnumNameInstance?
Kschuler 3-Feb-15 10:58am
I updated my question to make it a bit more clear.
Kschuler 3-Feb-15 11:01am
Ack..I figured it out! My module wasn't specified as being public. Thanks for helping me take a closer look! I assumed modules were public by nature.
ZurdoDev 3-Feb-15 11:09am
No problem. It had to be somewhere in the chain.
[no name] 10-Jun-15 3:25am
What access level does your class have?

As mentioned in the comments, somewhere in the chain something is not public. Should be MyEnumNameInstance.
Answered only to remove form unanswered list: solved by OP.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900