Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through text boxes
Thanks Tom. It works great. Is the way that I was doing thi incorrect? I was under the impression that it was best to us variables where ever possible. Tom Ogilvy Wrote: Assume the first cell is in row 3 Private sub CommandButton1_click() for i = 3 to 15 if cells(i,8).Value = "n/a" and cells(i,9).Value = "n/a" then Userform1.Controls("t" & i - 2).Value = "n/a" elseif cells(i,8).Value < "n/a" and cells(i,9).Value < "n/a" then Userform1.Controls("t" & i - 2).Value = cells(i,8).Value & ", " & _ cells(i,9).Value elseif cells(i,8).Value < "n/a" then Userform1.controls("t" & i - 2).Value = cells(i,8).Value end if Next i End sub name the textboxes t1 to t13 -- Regards, Tom Ogilv -- skrimp ----------------------------------------------------------------------- skrimpy's Profile: http://www.excelforum.com/member.php...fo&userid=1463 View this thread: http://www.excelforum.com/showthread.php?threadid=26346 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Form Text Boxes - Copy format of text boxes | Excel Discussion (Misc queries) | |||
Looping through text boxes | Excel Programming | |||
Looping through text boxes | Excel Programming | |||
looping through text boxes | Excel Programming | |||
Looping through Text boxes | Excel Programming |