Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I use two adjoining ListBoxes and need to have them kept in sync. All works as long as there's no vertical scrollbar involved - I use: sub ListBox1_Click (etc) ListBox2.ListIndex = ListBox1.ListIndex end sub What Event or technique would move the highlighted row in ListBox2 in sync with ListBox1, when scrolling occurs on the latter? TIA Paul |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Paul,
Try placing the following code into the code module of the worksheet that contains your listboxes. Regards, Vic Eldridge ---------------------------------- Dim Synchronised As Boolean Private Sub Worksheet_Activate() Synchronised = True Looper End Sub Private Sub Worksheet_Deactivate() Synchronised = False End Sub Sub Looper() Do While Synchronised = True ListBox2.ListIndex = ListBox1.ListIndex ListBox2.TopIndex = ListBox1.TopIndex DoEvents Loop End Sub ---------------------------------- "count" wrote in message ... Hi, I use two adjoining ListBoxes and need to have them kept in sync. All works as long as there's no vertical scrollbar involved - I use: sub ListBox1_Click (etc) ListBox2.ListIndex = ListBox1.ListIndex end sub What Event or technique would move the highlighted row in ListBox2 in sync with ListBox1, when scrolling occurs on the latter? TIA Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel compare workbooks: need to interrupt and resume sync scroll | Excel Discussion (Misc queries) | |||
listboxes | Excel Programming | |||
Sync - Bob Phillips | Excel Programming | |||
Sync Code | Excel Programming | |||
Listboxes | Excel Programming |