Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a list of stock symbols residing in cells H209 to H219, and within my
VBA code, I have: UserVal = UCase(Application.InputBox("Symbol?", , MyLastSymbol, , , , , 2)) so that there is a default there when the UserVal box pops up on my screen. How do I set up a loop so that the "MyLastSymbol" is populated by the value in H209, then H210 and so forth till it hits H219, then returns to H209 to start the loop again? My thanks in advance for any suggestions or code. Cheers! Brad |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Brad
You could try something like the code below all you would need to do is load the value 209 into i when you open your sheet or userform. Sub ShowSymbol() If i = 220 Then i = 209 mylastsymbol = Range("H" & i) UserVal = UCase(Application.InputBox _ ("Symbol?", , mylastsymbol, , , , , 2)) i = i + 1 End Sub hope this helps S |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to compute a range of cells based on another range of cells? | Excel Worksheet Functions | |||
how to compute a range of cells based on another range of cells? | Excel Worksheet Functions | |||
UserVal default value | Excel Programming | |||
Compare a selected Range with a Named range and select cells that do not exist | Excel Programming | |||
Copy a formula to a range of cells via VB6 using .Range(Cells(row,col), Cells(row,col)).Formula= statement | Excel Programming |