Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Loop?


Reply
 
Thread Tools Display Modes
  #1  
Old 01-28-2006, 11:33 AM
jaden2001 jaden2001 is offline
Junior Contributor
 
Join Date: Apr 2005
Location: Albany, GA
Posts: 235
Default Loop?


I have the vars(they are integers) d1 to d51(each 1 is set as a textbox value) and I want them to be mutiplied by z all at once. I was wondering how I would loop through those to get em all to multiply by z in a few lines instead of my big long idea.
__________________
Da Vinci - "Sleep is but a waste of time"
Reply With Quote
  #2  
Old 01-28-2006, 12:15 PM
stevo stevo is offline
Senior Contributor

* Expert *
 
Join Date: May 2004
Location: Manchester, England.
Posts: 1,254
Default

The best approach would to use a control array of textbox's then you can simply loop through them
Code:
Dim i As Integer For i = Text1.LBound To Text1.UBound 'code to multiply the value 'get the value using Val(Text1(i).Text) Next i
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->