Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Input Box
if you use application.inputbox, you can use the "type" parm.
numseries = application.inputbox(...., type:=1) type:=1 means that the user has to enter a number (any old number) to be able to click ok. Andy wrote: I figured out I needed to add Application Dim numSeries as Integer Do While numSeries < 1 Or numSeries 10 numSeries = Application.InputBox("How many series do you want to graph? _ (Between 1 and 10)", "How Many", "1 to 10") If numSeries = False Then Exit Sub Loop Is there a way to check if the input is in the wrong format? "Andy" wrote: I have VBA code as seen below and I want to get it to exit the sub if I press the Cancel button, but I'm not quite sure how that works. Dim numSeries as Variant Do While numSeries < 1 Or numSeries 10 numSeries = InputBox("How many series do you want to graph? _ (Between 1 and 10)", "How Many", "1 to 10") If numSeries = False Then Exit Sub Loop Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to input pictures automatically based on cell input? | Excel Worksheet Functions | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF | Excel Worksheet Functions | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |