Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Dynamic Multi Column ListBox

I don't know if this is possible, but I hope some can help.

I want to create a "Dynamic Multi Column ListBox" that consits of 2 columns
and then only returns the value in the 1st column. Example:

A1 = 1 - B1 = One
A2 = 2 - B2 = Two
A3 = 3 - B3 = Three

Dynamic ListBox =

1 One
2 Two
3 Three

If the user selects "2 Two" it returns the value of 2 to the appropriate cell.

As always, Any helps is truly appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Dynamic Multi Column ListBox

Hi,

Something like this may help.
You need to set the listbox property column count to 2 and column width to
49.95 pt;0.25 pt.

Private Sub ListBox1_Click()
For k = 0 To UserForm1.ListBox1.ListCount
If UserForm1.ListBox1.Selected(k) Then
Range("C1").Value = UserForm1.ListBox1.List(k) &
UserForm1.ListBox1.List(k, 1)
End If
Next
End Sub

Charles
"Ronbo" wrote in message
...
I don't know if this is possible, but I hope some can help.

I want to create a "Dynamic Multi Column ListBox" that consits of 2
columns
and then only returns the value in the 1st column. Example:

A1 = 1 - B1 = One
A2 = 2 - B2 = Two
A3 = 3 - B3 = Three

Dynamic ListBox =

1 One
2 Two
3 Three

If the user selects "2 Two" it returns the value of 2 to the appropriate
cell.

As always, Any helps is truly appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Dynamic Multi Column ListBox



"Charles Harmon" wrote:

Hi,

Something like this may help.
You need to set the listbox property column count to 2 and column width to
49.95 pt;0.25 pt.

Private Sub ListBox1_Click()
For k = 0 To UserForm1.ListBox1.ListCount
If UserForm1.ListBox1.Selected(k) Then
Range("C1").Value = UserForm1.ListBox1.List(k) &
UserForm1.ListBox1.List(k, 1)
End If
Next
End Sub

Charles
"Ronbo" wrote in message
...
I don't know if this is possible, but I hope some can help.

I want to create a "Dynamic Multi Column ListBox" that consits of 2
columns
and then only returns the value in the 1st column. Example:

A1 = 1 - B1 = One
A2 = 2 - B2 = Two
A3 = 3 - B3 = Three

Dynamic ListBox =

1 One
2 Two
3 Three

If the user selects "2 Two" it returns the value of 2 to the appropriate
cell.

As always, Any helps is truly appreciated.



I still get both values from the list box, i.e. if I choose "2 Two" it returns "2Two". I just want it to return "2". Any other ideas would be apprectiated.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Dynamic Multi Column ListBox

Yes,
Just change this :
Range("C1").Value = UserForm1.ListBox1.List(k) & UserForm1.ListBox1.List(k,
1)
To:
Range("C1").Value = UserForm1.ListBox1.List(k)

Charles

"Ronbo" wrote in message
...


"Charles Harmon" wrote:

Hi,

Something like this may help.
You need to set the listbox property column count to 2 and column width
to
49.95 pt;0.25 pt.

Private Sub ListBox1_Click()
For k = 0 To UserForm1.ListBox1.ListCount
If UserForm1.ListBox1.Selected(k) Then
Range("C1").Value = UserForm1.ListBox1.List(k) &
UserForm1.ListBox1.List(k, 1)
End If
Next
End Sub

Charles
"Ronbo" wrote in message
...
I don't know if this is possible, but I hope some can help.

I want to create a "Dynamic Multi Column ListBox" that consits of 2
columns
and then only returns the value in the 1st column. Example:

A1 = 1 - B1 = One
A2 = 2 - B2 = Two
A3 = 3 - B3 = Three

Dynamic ListBox =

1 One
2 Two
3 Three

If the user selects "2 Two" it returns the value of 2 to the
appropriate
cell.

As always, Any helps is truly appreciated.



I still get both values from the list box, i.e. if I choose "2 Two" it
returns "2Two". I just want it to return "2". Any other ideas would
be apprectiated.






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
Multi-Column Listbox properties Otto Moehrbach[_6_] Excel Programming 1 December 5th 04 10:35 PM
populating a multi-column Listbox Tom Ogilvy Excel Programming 3 April 26th 04 08:26 PM
populating a multi-column Listbox Harald Staff Excel Programming 1 April 26th 04 08:26 PM
Multi-column ListBox. Multiple bound columns??? Joe Mathis Excel Programming 5 December 10th 03 01:32 AM
Date formatting in a multi column listbox Nigel Brown[_2_] Excel Programming 2 September 3rd 03 11:29 AM


All times are GMT +1. The time now is 10:39 PM.

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"