Copying TextBox contents to a listbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ruiXinho
    New Member
    • Feb 2007
    • 3

    Copying TextBox contents to a listbox

    Hy i'm new here... i'm having some problem with VB... i've learned vb 4 years ago and i'm finding dificult to learn this new vb visual. this is it. I have 3 textbox and this is what i want.."When i press a button3 the program should send the things from textbox1 , 2 and 3 to a listbox... lisbox item 0 with textbox1.text ... listbox item 1 with textbox2.text and so on... but i can't do it... anyone help?....

    now another thing... i've done a calculator lol.. and i would like to make it a running program on windows.. how i do it?? thanks for now... and sorry for the bad English... i'm Portuguese lol
  • Geoff
    New Member
    • Feb 2007
    • 17

    #2
    What version of Visual Basic are you running in?

    Here is some code you may want to try for Visual Basic 6,0
    Code:
    List1.AddItem Text1.Text
    List1.AddItem Text2.Text
    List1.AddItem Text3.Text
    Put those in the section for the object you run to do the task, it should work.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Just wanted to let you know I have changed the subject of this thread to something which seemed more appropriate.

      Comment

      • ruiXinho
        New Member
        • Feb 2007
        • 3

        #4
        Nops. VB 2005 v8.... and thanks... but it didn't worked...

        Comment

        • ruiXinho
          New Member
          • Feb 2007
          • 3

          #5
          "I've found the solution :D ....

          ListBox1.Items. Insert(0, TextBox1.Text)

          thanks anyway.... but i still need help on puting my program into a runing program on windows.

          Comment

          Working...