Contents of textbox to listbox! - Need quick fixing

  • Thread starter Thread starter rowanhoffy
  • Start date Start date
R

rowanhoffy

Guest
Hey Everyone,
I have a really annoying problem that needs fixing fast. Basically i want to be able to enter information into a textbox "txtPlace", then be able to click on a command button "cmdadd", then the contents from the text box will be copied into the listbox "lstPlace" and the textbox will be reset. Any help would be greatlly appreciated as soon as possible. Its needed for school work. Thanks a million!!!

Hoff
 
Hi friend,

place a button called "add" and a text box and a list box with the names u have suggested.
View the properties of List box and on the second tab (Data), select "Value List" from the "Row Source Type".

in the click event of the button, write the following code.


Private Sub add_Click()
lstPlace.RowSource = lstPlace.RowSource & Me.txtPlace & ";"
Me.txtPlace = ""
End Sub


Thanx
 

Users who are viewing this thread

Back
Top Bottom