Synchronising the scrolling of two ActiveX listboxes .

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
9,806
Office Version
  1. 2016
Platform
  1. Windows
I guess this could be achieved by starting a loop/timer upon the ListBox receiving the focus and setting the ListBox TopIndexes then exiting the loop when loosing focus but I was wondering if there is a workaround this w/o using a loop to avoid potential problems.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi Jaafar,

nice to see you on here again .... a question: why have 2 listboxes like that? Are they going to be side by side? Are they going to contain the same data, or different data?

Not that I have any ideas at this point, I was just wondering why you weren't thinking of having a single multicolumn listbox.
 
Upvote 0
Thanks for responding Glenn.

The listboxes are going to be side by side . different data but related - for instance ListBox1 contains Country names and Listbox2 contains their respective capital cities.

The reason I wanted to have them seperated is because they have a linked cell each which will not work for multicolumn listboxes but I think that the multicolumn solution you suggested is the way to go i'll will just have to update the linked cells via code.

However , even using a single multicolumn listbox is going to be tricky as there is no Scroll event.
 
Upvote 0
If you have a multicolumn listbox, the linked cell will give the leftmost item when a choice is made. You can generate the associated capital city with a formula, surely?
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top