Tyler
12-26-2002, 05:06 PM
Ok I will write out some lessons for vb I just finished one for my site but I will post it here also.
The first thing you going to want to do it open your VB of course do standard exe
and on the form add your listbox and your text and one command button
now if you need some like example i will be more then willing to through a like form togather for you will how to do
but im going to put the code on here also
when you get your text and listbox plus the command button each one show say this in them
List1
Text1
Command1
now when you comfirm that they all are on there
double click on the Command1
it will bring up another window which should have this in it
Private Sub Command1_Click()
End Sub
now inbetween the Command!_Click and the End Sub
in that space your going to want to type this
List1.Additem Text1.Text
now what that is doing is when you click on Command1 it will add text1.text to list1
now you can check to see if it work by click on the play button on the toolbar at the top it will start the program then click on Command1 then it should add Text1 to the list
now for the other way of add text to a list is using a Input box if you notice on my crackers it what i use when you click add for what it is it will bring up a box telling you to enter something
now all you do it delete the the Text1 which to do that is right click on the Text1 and go to delete
now double lcik on command1 and delete what you typed before and put this instead
On Error Resume Next
Dim MSG As String
MSG = InputBox("Enter a Text To be Added To List", "List Add")
If MSG = "" Then Exit Sub
List1.AddItem MSG
now remeber thatr go inbetween the
Private Sub Command1_Click()
End Sub
now im going to tell what some of this stuff means
MSG = InputBox("Enter a Text To be Added To List", "List Add")
MSG is the Inbox what you type in the text to be added
the enter a text to be added to list
is if you look on the inputbox you will see that on the top and the list add will also be on there now you can change what is said there but you have to make sure you keep the " there
if you have any questions or it is not working right for just post here
The first thing you going to want to do it open your VB of course do standard exe
and on the form add your listbox and your text and one command button
now if you need some like example i will be more then willing to through a like form togather for you will how to do
but im going to put the code on here also
when you get your text and listbox plus the command button each one show say this in them
List1
Text1
Command1
now when you comfirm that they all are on there
double click on the Command1
it will bring up another window which should have this in it
Private Sub Command1_Click()
End Sub
now inbetween the Command!_Click and the End Sub
in that space your going to want to type this
List1.Additem Text1.Text
now what that is doing is when you click on Command1 it will add text1.text to list1
now you can check to see if it work by click on the play button on the toolbar at the top it will start the program then click on Command1 then it should add Text1 to the list
now for the other way of add text to a list is using a Input box if you notice on my crackers it what i use when you click add for what it is it will bring up a box telling you to enter something
now all you do it delete the the Text1 which to do that is right click on the Text1 and go to delete
now double lcik on command1 and delete what you typed before and put this instead
On Error Resume Next
Dim MSG As String
MSG = InputBox("Enter a Text To be Added To List", "List Add")
If MSG = "" Then Exit Sub
List1.AddItem MSG
now remeber thatr go inbetween the
Private Sub Command1_Click()
End Sub
now im going to tell what some of this stuff means
MSG = InputBox("Enter a Text To be Added To List", "List Add")
MSG is the Inbox what you type in the text to be added
the enter a text to be added to list
is if you look on the inputbox you will see that on the top and the list add will also be on there now you can change what is said there but you have to make sure you keep the " there
if you have any questions or it is not working right for just post here