title: VB 2010 'variable' is not declared. It may be inaccessible due to it's protection level
body: <p>i'm sort of a n00b to VB and was wondering how to make a variable available across multiple Subs. It's just a test app to get familiar with VB.
  My Code:</p>
  
  <pre><code>Public Class Sentences
  
  Private Sub SentenceBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SentenceBox.TextChanged
      If Me.Text = Trim(Sentence) Then
          MsgBox("Good job!")
          Main_Menu.Show()
          Me.Close()
      End If
  End Sub
  
  Private Sub ABCs_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      Dim random As Integer = CInt((Rnd() * 10) + 1)
      Dim Sentence As String
  
  
      Select Case random
          Case 1
              Sentence = "The quick brown fox jumped over the lazy dog!"
          Case 2
              Sentence = "Hi there, how are you doing?"
          Case 3
              Sentence = "What is the answer to life?"
          Case 4
              Sentence = "The cat in the hat was fat."
          Case 5
              Sentence = "John and Sam had always been fat."
          Case 6
              Sentence = "The snow is falling hard."
          Case 7
              Sentence = "Here, dinner is always served nightly."
          Case 8
              Sentence = "The dog barks at the passing cars."
          Case 9
              Sentence = "The dust settles on the books."
          Case 10
              Sentence = "Fire burns brightly when you add kerosene."
      End Select
  End Sub
  
  Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
      SentenceBox.Text = Sentence
  
      End Sub
  End Class
  </code></pre>
  
  <p>My error is:</p>
  
  <blockquote>
    <p>"Sentences" is not declared. It may be in accessable due to it's protection level."</p>
  </blockquote>