1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Visual Basic Arrays

Discussion in 'Software Development' started by henrys212, Oct 6, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. henrys212

    henrys212 Thread Starter

    Joined:
    Oct 6, 2008
    Messages:
    2
    Its been a while since I did some programming so I am a bit rusty. I was asked if I can create a small program that will list a few checkboxes and on the botton of the page should be a total amount of check boxes that are checked.

    I know that the best way to do it is by creating an array. I am using Visual Basic 2005. I recall that in the previous versions inorder for me to create multiple controls into an array all I had to do is copy one control and paste it. VB would prompt me if I want to create these objects into an array. I tried doing that with VB 2005 and its not working. Does anyone have any idea how I can make all my check boxes to be an array?

    Thank You for your help in advance.
     
  2. draceplace

    draceplace

    Joined:
    Jun 8, 2001
    Messages:
    2,583
    You don't need an array unless you have a huge amount of check boxes.
    pseudo code...

    If ck_box1 is yes then
    Total = Total + amount1
    End if
    IF ck_box2 is yes then
    Total = Total + amount2
    End if
     
  3. henrys212

    henrys212 Thread Starter

    Joined:
    Oct 6, 2008
    Messages:
    2
    I plan on having in the future over a 100 check boxes. How would I do it then?
     
  4. draceplace

    draceplace

    Joined:
    Jun 8, 2001
    Messages:
    2,583
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/756618

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice