Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
LOOP HELP!
I am trying to create a loop in which it will ask the same questions to the
user repeatedly until the user opts out. However, I need to be able to reference the answers to all of their questions each time they go through the loop. How do assign a variable when they will change each time and be differrent for each question they are asked? example: color type size continue? color type size continue? loop---------and have all of those answers accessible. Not just the last one. Thanks D |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
LOOP HELP!
You can use an array variable and if the size is variable you can use the
combination of Redim Preserve something like Sub readInput() Dim i As Long Dim myarray() Do While <---- some boolean to check ReDim Preserve myarray(i) myarray(i) = MsgBox("your question", vbYesNoCancel) i = i + 1 Loop End Sub -- Best regards, Edward "DarrenL" wrote: I am trying to create a loop in which it will ask the same questions to the user repeatedly until the user opts out. However, I need to be able to reference the answers to all of their questions each time they go through the loop. How do assign a variable when they will change each time and be differrent for each question they are asked? example: color type size continue? color type size continue? loop---------and have all of those answers accessible. Not just the last one. Thanks D |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
returning back to loop check condition without completing the loop | Excel Programming | |||
Loop to Filter, Name Sheets. If Blank, Exit Loop | Excel Programming | |||
Naming Worksheets - Loop within a loop issue | Excel Programming | |||
(Complex) Loop within loop to create worksheets | Excel Programming | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming |