stixx
10-09-2015, 11:13 PM
getting a type mismatch error but i've defined all the variables. the idea is that the program shows an error message when A, B or C arent entered
Option Explicit
Function main()
Dim packageSelection As String
Dim adultTickets As Integer
Dim childTickets As Integer
packageSelection = InputBox("Welcome, please enter your preffered package.")
packageSelection = UCase(packageSelection)
Do While packageSelection <> "A" Or "B" Or "C"
MsgBox ("error, please enter package selection")
packageSelection = InputBox("Welcome, please enter your preffered package.")
packageSelection = UCase(packageSelection)
Loop
Option Explicit
Function main()
Dim packageSelection As String
Dim adultTickets As Integer
Dim childTickets As Integer
packageSelection = InputBox("Welcome, please enter your preffered package.")
packageSelection = UCase(packageSelection)
Do While packageSelection <> "A" Or "B" Or "C"
MsgBox ("error, please enter package selection")
packageSelection = InputBox("Welcome, please enter your preffered package.")
packageSelection = UCase(packageSelection)
Loop