title: VBA - User-defined type not defined
body: <p>I am trying to update an VBA module to use the <code>System.Windows.Forms.FolderBrowserDialog</code> class. I declared my object as follows:</p>
  
  <pre><code>Dim MyFolderBrowser As New System.Windows.Forms.FolderBrowserDialog
  </code></pre>
  
  <p>Running this gave me the error <code>User-defined type not defined</code>. I figured the compiler didn't know about that class so I tried going to <code>Tools &gt; References</code> and adding <code>Systems_Windows_Forms</code>, but I'm still getting the same error. Does anyone know what I'm missing here? Do I need a reference to the library in my code as well?</p>