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

Hello all,

please can i ask for some help,
i have tried many ways of getting two listboxes to line up
with each other, i would like to know of any code that
would allow one listbox to select the apropriate value
from an adjacent list box.
eg. one list box contacins there application numbers (only
the ones found) and the second list box displays there
names, i would like to select a name and it will select
the number next to the name aswell (these list boxes are
already lined up and will have the same number of values
in)

thank you,

Robert Couchman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Listbox control

Hi Robert

If I understand you correct, you want like "third from the top in both".
These will synk them:

Private Sub ListBox1_Click()
If ListBox2.ListIndex < ListBox1.ListIndex Then _
ListBox2.ListIndex = ListBox1.ListIndex
End Sub

Private Sub ListBox2_Click()
If ListBox1.ListIndex < ListBox2.ListIndex Then _
ListBox1.ListIndex = ListBox2.ListIndex
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Robert Couchman" skrev i melding
...
Hello all,

please can i ask for some help,
i have tried many ways of getting two listboxes to line up
with each other, i would like to know of any code that
would allow one listbox to select the apropriate value
from an adjacent list box.
eg. one list box contacins there application numbers (only
the ones found) and the second list box displays there
names, i would like to select a name and it will select
the number next to the name aswell (these list boxes are
already lined up and will have the same number of values
in)

thank you,

Robert Couchman



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
Shrinking Listbox from Control Toolbox kumik5000 Excel Discussion (Misc queries) 3 December 5th 08 09:11 PM
Wrap text in a control listbox DavidS Excel Discussion (Misc queries) 4 April 22nd 08 06:39 PM
listbox control in VBA Ard Excel Programming 1 January 28th 04 05:53 PM
Control ToolBox ListBox Irratic Phil Hageman[_3_] Excel Programming 0 January 12th 04 06:37 PM
Enabling checkboxes in a listbox control Tokash Excel Programming 0 October 9th 03 01:07 AM


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