I am about to finish my college project, so I am just really eager to finish this! after apparently finishing all of the hard bit and running the program, errors began popping up. This is the one I can't fix so far. Below see a link to the error log http://pastebin.com/8FMjUFF5 Also, bellow you can see my code for that bit I am trying to do:
Public Sub Pizza()
If Pizza_BaseTextBox.Text = 1 Then
PizzaBase = 2.99
ElseIf Pizza_BaseTextBox.Text = 2 Then
PizzaBase = 4.99
ElseIf Pizza_BaseTextBox.Text = 3 Then
PizzaBase = 6.99
ElseIf Pizza_BaseTextBox.Text = 4 Then
PizzaBase = 8.99
Else
MsgBox("Please enter the correct number corresponding the pizza size you desire! See instructions")
End If
If CInt(Topping1TextBox.Text) > 0 And CInt(Topping1TextBox.Text) < 12 Then 'Error here
Topping1 = 0.5
Else
Topping1 = 0
End If
If CInt(Topping2TextBox.Text) > 0 And CInt(Topping2TextBox.Text) < 12 Then
Topping2 = 0.5
Else
Topping2 = 0
End If
If CInt(Topping3TextBox.Text) > 0 And CInt(Topping3TextBox.Text) < 12 Then
Topping3 = 0.5
Else
Topping3 = 0
End If
If CInt(Topping4TextBox.Text) > 0 And CInt(Topping4TextBox.Text) < 12 Then
Topping4 = 0.5
Else
Topping4 = 0
End If
If CInt(Topping5TextBox.Text) > 0 And CInt(Topping5TextBox.Text) < 12 Then
Topping5 = 0.5
Else
Topping5 = 0
End If
PizzaTotal = PizzaBase + Topping1 + Topping2 + Topping3 + Topping4 + Topping5
End Sub
I would really appreciate it if I could receive some help about this.
Thanks a lot for the help and support, all comments are welcome.
Regards,
Jose rodriguez