Solved

vb.net pass structure into class function

Posted on 2006-07-14
5
619 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 86

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

636 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