How to pass a structure to a form subroutine

  • Thread starter Thread starter Young
  • Start date Start date
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
 
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
 
Back
Top