title: VBA Input Box and If Statement - Catching user misspellings
body: <p>I'm practicing some VBA code, and I'm trying to write a code that will display the appropriate price in a message box for various types of seat locations that have their assigned price. I also want to make sure I use an If statement for this code.</p>
  
  <p><strong>Seat Location:</strong></p>
  
  <p>Box $75</p>
  
  <p>Pavilion $30</p>
  
  <p>Lawn $21</p>
  
  <p>What I have so far is an input box that asks the user to enter the seat location, and a message box will come up with the assigned price. My problem is figuring out how to display the appropriate price when the user inadvertently misspells the seat location. The code I have right now works if everything is spelled correctly, but how do I make it work even if the user misspelled the seat location ex. Instead of Pavilion they enter Pavillion. </p>
  
  <p>Here is the code I have so far. </p>
  
  <pre><code>    Option Explicit
      Public Sub ConcertPricing()
      'declare variables
      Dim strSeat As String
      Dim curTicketPrice As Currency
  
      'ask user for desired seat location
      strSeat = InputBox("Enter seat location", "Seat Location")
     'if statement that assigns appropriate pricing according to seat selection
     If strSeat = "Box" Then
      curTicketPrice = 75
      Else
         If strSeat = "Pavilion" Then
         curTicketPrice = 30
         Else
            If strSeat = "Lawn" Then
            curTicketPrice = 21
            Else
               If strSeat = "Other" Then
               curTicketPrice = 0
               End If
            End If
         End If
      End If
  
      'pricing results based on seat selection
      MsgBox ("The ticket price for a seat in the " &amp; strSeat &amp; " location is:    " &amp; Format(curTicketPrice, "$0.00"))
  
      End Sub
  </code></pre>
  
  <p>Thank you!</p>