DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Thread: max index value

  1. #1
    Join Date
    Nov 2004
    Posts
    293

    max index value

    Using VB6 I have created myself an array of check boxes. I now want to do a for loop from 1 to the max index number of the check boxes I have in the array. I do not know how to get the max index number of check boxes. I have tried UBound() but that just gives me an error (Compile error: Expected array). Is there some other way to get the max index number ??

    dim i as interger
    For i = 1 to (max index number??)
    'do stuff
    next

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    I don't have access to VB6 at the moment, but if I remember correctly, you want the UBound property of the control array, rather than the UBound method:

    For I = 1 to ControlName.UBound
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Nov 2004
    Posts
    293
    Yep, that works just great

    thanks again

Similar Threads

  1. Replies: 1
    Last Post: 02-14-2009, 07:24 AM
  2. Replies: 2
    Last Post: 07-19-2005, 06:09 AM
  3. Max index value in a dynamic array
    By AM003295 in forum VB Classic
    Replies: 4
    Last Post: 04-25-2005, 04:01 PM
  4. Getting the Index of a Request.Form key
    By THarlow in forum Web
    Replies: 0
    Last Post: 02-16-2005, 12:30 PM
  5. Clustered Index vs Non-clustered
    By Michael Tzoanos in forum Database
    Replies: 5
    Last Post: 08-09-2002, 01:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links