OK. I’m stuck.
I’m trying to do a “Do While Loop”. Desired results are:
Do While NewSize = False ‘ I have tried = “”, < 0, > 0. = Null – No Joy
NewSize = InputBox("Enter the last Sample # you want " & vbNewLine & "to include in your sample set" & vbNewLine _
& vbNewLine & "If you got here by mistake:" & vbNewLine & vbNewLine & "then enter a '0' into the input box and Click 'OK' or press ‘Enter’ to use the entire Sample Data Set'" & vbNewLine & "Your must enter a value to proceed")
' MsgBox 1
MsgBox "You have not entered a value. Click 'OK' to Retry", vbOKOnly, "No Input"
Loop
I’m trying to do a “Do While Loop”. Desired results are:
- Do While user input to InputBox “NewSize” <> False ‘ User hit Enter, OK or Cancel with no input
- If no user input put up MsgBox 1
- On OK, Loop back to entry point
- On valid user input (anything => 0), exit Loop to next procedure
- Enters Loop and puts up Input Box “NewSize”
- If user hits Enter, OK or Cancel without inputting valid data, puts up MsgBox 1. ‘ Correct
- On hit OK in MsgBox 1, exits Loop to next proc. ‘ Does not Loop. - Not correct
- If user inputs valid data for InputBox, puts up MsgBox 1. ‘ Not correct
- Should not put up MsgBox 1. Should exit Loop to next proc.
- On click OK for MsgBx 1, exits Loop and steps into next Proc. – Not correct
- This is correct except it should not put MsgBox 1 in as it does in step 4.
- It should just exit the Loop to the next proc.
Do While NewSize = False ‘ I have tried = “”, < 0, > 0. = Null – No Joy
NewSize = InputBox("Enter the last Sample # you want " & vbNewLine & "to include in your sample set" & vbNewLine _
& vbNewLine & "If you got here by mistake:" & vbNewLine & vbNewLine & "then enter a '0' into the input box and Click 'OK' or press ‘Enter’ to use the entire Sample Data Set'" & vbNewLine & "Your must enter a value to proceed")
' MsgBox 1
MsgBox "You have not entered a value. Click 'OK' to Retry", vbOKOnly, "No Input"
Loop