Listbox value to be placed into a textbox

C

Corey

I have not used a Listbox before and have populated it.
But i want when CommandButton3 is clicked, the
value HIGHLIGHTED in Listbox1 to be Placed into Textbox1.

How do i do this?

Corey
 
C

Corey

Got:
Private Sub CommandButton3_Click()
TextBox1.Value = ListBox1.Value
End Sub

BUT, the Listbox has 2 Columns with BOUNDCOLUMN = 2

How do i get the 2nd Column Value in the Textbox instaed of the 1st ?
I have not used a Listbox before and have populated it.
But i want when CommandButton3 is clicked, the
value HIGHLIGHTED in Listbox1 to be Placed into Textbox1.

How do i do this?

Corey
 
T

Tom Ogilvy

Private Sub CommandButton3_Click()
TextBox1.Value = ListBox1.Value
End Sub

works fine for me. Suggest your Boundcolumn property is set to 1.

--
Regards,
Tom Ogilvy

Got:
Private Sub CommandButton3_Click()
TextBox1.Value = ListBox1.Value
End Sub

BUT, the Listbox has 2 Columns with BOUNDCOLUMN = 2

How do i get the 2nd Column Value in the Textbox instaed of the 1st ?
I have not used a Listbox before and have populated it.
But i want when CommandButton3 is clicked, the
value HIGHLIGHTED in Listbox1 to be Placed into Textbox1.

How do i do this?

Corey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top