How to pass a structure to a form subroutine

Y

Young

I've the following structure:

Structure MyStruct
Dim x As String
Dim y As String
End Structure

In one of my form (Form1), I have this sub:

Sub Test(byref XXX as MyStruct)

.......

end sub

I then try to pass in the structure by doing this:

Dim mmm as MyStruct
Form1.Text(mmm)

The above caused an error when in the Sub declaration:

This is the error: XXX cannot expose type MyStruct outside the project through class Form1

Can someone please help?

TIA
Young
 
C

Cor Ligthert[MVP]

Young,

Do you have some documentation about the syntax you use here,

I never saw it, and therefore I am curious how to use this

I know the Text property as the property that shows the name of a form, it
is simple a String, I don't know it as an array, type or collection.

Form1.Text(mmm)

Cor
 

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