Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. add sum from list

add sum from list

Scheduled Pinned Locked Moved Visual Basic
4 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I want to add a sum in a textbox from a list of numbers in vb6 and it's not working sum = 0 i = 0 For i = 1 To List1.ListCount sum = sum + List1.Text Next 1 Text1.Text = sum Thankm you for helping me

    A 1 Reply Last reply
    0
    • L Lost User

      I want to add a sum in a textbox from a list of numbers in vb6 and it's not working sum = 0 i = 0 For i = 1 To List1.ListCount sum = sum + List1.Text Next 1 Text1.Text = sum Thankm you for helping me

      A Offline
      A Offline
      Andrew Stampor
      wrote on last edited by
      #2

      This looks like a homework assignment of sorts. I'll give you a couple of hints. 1) VB starts counting at 0 by default. 2) List controls do not have a "Text" attribute. You will need to find a method that will allow you to access each item in the list independently. Good luck.

      L 1 Reply Last reply
      0
      • A Andrew Stampor

        This looks like a homework assignment of sorts. I'll give you a couple of hints. 1) VB starts counting at 0 by default. 2) List controls do not have a "Text" attribute. You will need to find a method that will allow you to access each item in the list independently. Good luck.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        I am stock I need more help please Thank you

        A 1 Reply Last reply
        0
        • L Lost User

          I am stock I need more help please Thank you

          A Offline
          A Offline
          Andrew Stampor
          wrote on last edited by
          #4

          Investigate the "List" property of the List object. List1.List()

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups