Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,661 of 10,840    |
|    Kevin H to All    |
|    populate textboxes with a loop??    |
|    21 Aug 05 03:10:48    |
   
   From: spamsux@noyoudont.com   
      
   Apologies in advance if this sounds slow-witted, but I didn't find it here.   
      
   Need to populate some textboxes on a form. While I could hard code it (the   
   number of options aren't that high), it would be more compact/efficient to   
   use a loop.   
      
   However, I haven't found anything that describes how to reference the   
   textboxes sequentially ... evaluating the hard part of the textbox name,   
   with the number of the loop iteration, to address the specific box.   
      
   E.G. textboxes named textbox1, textbox2, textbox3   
      
   For x = 1 to 3   
   {textbox(x)} = x   
   Next x   
      
   What I need is how to call out the part of the line {in braces} so that it   
   executes dynamically. In the stupid example, t-box 1 would have 1, t-box 2   
   2, t-box 3 3.   
      
   I really don't want to get into arrays here, would be killing an ant with a   
   cannon, and more learning curve to overcome ... even though my example looks   
   like array notation   
      
   Thanks in advance for help with a real rookie question, but I don't write   
   much code ... as should be painfully obvious from the question.   
      
   Kevin   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca