Solved

vb.net pass structure into class function

Posted on 2006-07-14
5
609 Views
Last Modified: 2008-01-09
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?
0
Comment
Question by:jackjohnson44
5 Comments
 
LVL 17

Expert Comment

by:ZeonFlash
ID: 17111536
Does your initInput need to be Public?  If not, set it to Private and it works.
0
 

Author Comment

by:jackjohnson44
ID: 17111555
yes, it does
0
 
LVL 24

Expert Comment

by:Jeff Certain
ID: 17111883
I'd play with a couple things...

1. Try declaring singleStep as Public Shared.
2. Move the singleStep into the ctrlMyControl class.
0
 
LVL 24

Expert Comment

by:Jeff Certain
ID: 17111885
Check that... option 2 works; option 1 doesn't
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 17112921
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now