oh i forgot to add address and phone# so now i would like to know how i can put all of these things in an input box to add in a "label" instead of an listbox so when they press the button it would prompt them to add an name then a address then a phone number
You haven't said what version of VB you're using, so for now I'll assume VB6 (because it's the version I'm familiar with).
The simplest way would be to use the
InputBox() function. This is a pretty ugly function, but it does the job. You can improve the look once you've got a better idea of how to go about it.
The general technique would be to drop a command button on the form, and in the Click event procedure for the button, add something like...
-
Dim Answer As String
-
Answer = InputBox("Enter your name", "Some window title")
-
List1.AddItem Answer
-
Of course, to handle more than one input you can just call the InputBox() function multiple times, to prompt for one after another. But ideally you would want to create your own form with textboxes to accept the name and so on, then just show that. This is one area where VB versions vary quite a bit.