title: Cannot declare a variable with public access in a class from a module
body: <p>I am making a GUI based application (forms), and encountered the following error.</p>
  
  <p>Firstly, I am declaring the following stuff in a module</p>
  
  <pre><code>Module test_mod
  
      Public Structure sub_struct
          Public test_int() As Integer
          Public Sub foo()
              ReDim test_int(3)
          End Sub
      End Structure
  
      Public Structure main_struct
          Public test_aaa As sub_struct
      End Structure
  
  End Module
  </code></pre>
  
  <p>Of course, my real code is longer and more complicated than this, but this piece of code will be a perfect example.</p>
  
  <p>Then I declare this <code>test_mod</code> in the main class</p>
  
  <pre><code>Public Class Form1
      Public test_this_struct As New test_mod.main_struct
      'do something here
  End class
  </code></pre>
  
  <p>My intention is making the <code>test_this_struct</code> accessible by other modules (which are not shown here), such that the main class will be short and tidy. However, it keeps complaining the following:
  <code>test_this_struct</code> cannot expose type <code>test_mod.main_struct</code>outside the project through class <code>form1</code>.</p>
  
  <p>I do not see any <code>Private</code> here, and I tired to remove the <code>new</code>, <code>redim</code>, and "struct in struct", but they did not work.</p>
  
  <p>I found an <a href="http://msdn.microsoft.com/en-us/library/90htzsex.aspx" rel="nofollow">article</a> and its related content on MSDN, but it did not really help me.</p>