Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Listbox value to be placed into a textbox

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Listbox value to be placed into a textbox

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 ?
"Corey" wrote in message ...
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Listbox value to be placed into a textbox

The same way you did the value in column one. select it.

"Corey" wrote:

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 ?
"Corey" wrote in message ...
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Listbox value to be placed into a textbox

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

"Corey" wrote in message
...
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 ?
"Corey" wrote in message
...
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste values from TextBox to ListBox avi Excel Programming 0 August 24th 06 05:46 PM
listbox and textbox problem jeramie[_2_] Excel Programming 2 May 22nd 06 09:15 PM
Retaining focus on a textbox / listbox item pair after validation = false. chatterbox Excel Programming 2 April 4th 06 11:42 AM
Copying data from a listbox to a textbox Kevin Vaughn Excel Programming 2 March 3rd 06 11:26 PM
Populating TextBox Value--using ListBox jpendegraft[_15_] Excel Programming 1 May 2nd 04 03:53 AM


All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"