Try this instead
Dim bread As Single = InputBox("Please enter the amount of bread.", "Buy")
If bread > 10 Then
MessageBox.Show("You may only buy 10 items at a time.", "Error", MessageBoxButtons.OK)
TextBox1.Text = ""
Exit Sub
Else
TextBox1.Text = bread
End If