alexaronson
Active Member
- Joined
- Sep 30, 2005
- Messages
- 314
Hello
I am writing some code that ask a user to input two variabls via an InputBox.
In order for the down stream code to work there are 3 conditions that have to be met.
1) startValue > 0
2) endValue < 100
3) startValue < endValue
I am trying to use a Do Until function, but I cannot seem to figure out how to get it reprompt the user until all 3 conditions are met.
Here is what I have so far.
Thanks for any help you can give!
I am writing some code that ask a user to input two variabls via an InputBox.
In order for the down stream code to work there are 3 conditions that have to be met.
1) startValue > 0
2) endValue < 100
3) startValue < endValue
I am trying to use a Do Until function, but I cannot seem to figure out how to get it reprompt the user until all 3 conditions are met.
Here is what I have so far.
Code:
Dim startValue as Integer, endValue as Integer
startValue = InputBox(Prompt:="Please enter the least number of days to compute an average with greater than 0.")
endValue = InputBox(Prompt:="Please enter the most number of days to compute an average with. 100 is the max")
Do Until startValue < endValue
startValue = InputBox(Prompt:="Please enter the least number of days to compute an average with must be less than the most number of days, please enter agian.")
endValue = InputBox(Prompt:="Please enter the most number of days to compute an average with must be more than the least number of days. 100 is the max")
Loop
Thanks for any help you can give!