vb.net pass structure into class function

I am trying to pass a public structure contained in a mod into a function in a control.

Module ModStructures
    Public Structure singleStep
        Public instrument As String
        Public mode As String
        Public paramater As String
        Public label As String
        Public inputType As String
        Public value As String
        Public options As String
    End Structure
End Module

Public Class ctrlMyControl
    Public Function initInput(ByVal stepObject As singleStep)

I am getting the error:
'stepObject' cannot expose type 'ModStructures.singleStep' outside the project through class 'ctrlMyControl'

What am I doing wrong?
jackjohnson44Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
Not at my puter right now...but I believe putting Public in front of your Module declaration may help:

Public Module ModStructures
    ....
End Module
0
 
ZeonFlashCommented:
Does your initInput need to be Public?  If not, set it to Private and it works.
0
 
jackjohnson44Author Commented:
yes, it does
0
 
Jeff CertainCommented:
I'd play with a couple things...

1. Try declaring singleStep as Public Shared.
2. Move the singleStep into the ctrlMyControl class.
0
 
Jeff CertainCommented:
Check that... option 2 works; option 1 doesn't
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.