Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Listbox Problem

I have a listbox which is populated with data from a worksheet (column count
= 5)

As the 6th column is a descriptive text field, I would like to hold the data
of the 6th column in another listbox on the same userform.

When the user clicks on the rows in the first listbox, I would like the 6th
column text field to show in the 2nd listbox.

Can anyone help me understand how I can make this happen.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Listbox Problem


Some clarification needed. When you say

When the user clicks on the rows in the first listbox, I would like the
6th column text field to show in the 2nd listbox

do you want:




- For repeated clicks on a row in th 1st listbox to keep adding the
same information to the second listbox ending up with similar rows in
the second listbox?
- Will you instead want to allow multiple selections in the first
list box and only display what's selected in the first list box in the
second listbox?
- Add only once to the second listbox any row clicked in the first
listbox?
- Show only one row in the second listbox, that being the last
clicked row in the first listbox?


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?u=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=196102

http://www.thecodecage.com/forumz

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Listbox Problem

Thanks for your quick reply, I would like to show only one row in the second
listbox, that being the last clicked row in the first listbox.

Cheers

"p45cal" wrote:


Some clarification needed. When you say


When the user clicks on the rows in the first listbox, I would like the
6th column text field to show in the 2nd listbox

do you want:




- For repeated clicks on a row in th 1st listbox to keep adding the
same information to the second listbox ending up with similar rows in
the second listbox?
- Will you instead want to allow multiple selections in the first
list box and only display what's selected in the first list box in the
second listbox?
- Add only once to the second listbox any row clicked in the first
listbox?
- Show only one row in the second listbox, that being the last
clicked row in the first listbox?


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?u=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=196102

http://www.thecodecage.com/forumz

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Listbox Problem


VBA Code:
--------------------


Private Sub ListBox1_Click()
ListBox2.Clear
ListBox2.AddItem Range(ListBox1.RowSource).Offset(ListBox1.ListInde x, 5).Cells(1)
End Sub

--------------------


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?u=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=196102

http://www.thecodecage.com/forumz

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
ListBox problem Patrick Simonds Excel Programming 6 December 24th 05 02:22 AM
listbox problem bawar Excel Programming 0 May 19th 05 05:50 PM
listbox problem [email protected] Excel Programming 1 March 10th 05 01:08 PM
ListBox problem Mike Fogleman Excel Programming 3 December 29th 03 12:23 PM
Listbox problem Stuart[_5_] Excel Programming 6 August 18th 03 09:14 PM


All times are GMT +1. The time now is 10:05 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"