I've got the userform attached. Every time I click the "Proceed!" button, I have it verify that the weight of all batches combined is greater than the weight that was initially assigned in the Product Details box;
If I say yes, it prompts me to move on or not; if I say no, I want the userform to allow me to adjust the quantities once more.
I've typed the code below, however whenever I select "No," the message box repeatedly appears:
Private Sub CommandButton1_Click() 'Proceed! Button
Dim answer As Integer
q = Val(Left(Label2.Caption, 5)) 'Weight in Product Details --> 15.12 tons
Total = BatchTotal1 + BatchTotal2 + BatchTotal3 + BatchTotal4 + BatchTotal5 'Publicly dimmed previously
Again:
If Total > q Then
answer = MsgBox("Batches total weight is more than you assigned first, Do you want to proceed?", vbQuestion + vbYesNo)
If answer = vbYes Then
GoTo Continue
Else
GoTo Again
End If
End If
Continue:
'Another code