title: VB Adding an item to listbox on a different form giving null reference exception
body: <p>I am getting a an Null reference exception when trying to add an item to a listbox in a different form. </p>
  
  <p>This is my error at run time.</p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.NullReferenceException'
    occurred in ... Additional information: Object reference not set to an
    instance of an object.</p>
  </blockquote>
  
  <p>I am trying to connect the Mainform by initializing it at the top of the class of the secondForm. after I have my data i want to add it to a listbox it the mainform. </p>
  
  <pre><code>Public Class FormHairdresser //The second form
       Dim varMainForm As FormMain //connecting the forms ?
  
  Private Sub btnAddHairdresser_Click(sender As Object, e As EventArgs) Handles btnAddHairdresser.Click
  
  hairdresser = HairdresserChoices(HairdresserID) // get the data
    varMainForm.lstListBox.Items.Add(hairdresser) //Run time error breaks here.
  </code></pre>