LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Link two listboxes together

I don't know if it's possible, but why not just have multiple columns in one
listbox and make the listbox wide enough to show both. It seems like a much
easier solution.

But you could sync the listboxes after you leave one of them:

Option Explicit
Private Sub ListBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.ListBox1.TopIndex = Me.ListBox2.TopIndex
End Sub
Private Sub ListBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.ListBox2.TopIndex = Me.ListBox1.TopIndex
End Sub
Private Sub UserForm_Initialize()
Dim iCtr As Long
With Me.ListBox1
.IntegralHeight = True
For iCtr = 1 To 20
.AddItem "asdf" & iCtr
Next iCtr
End With
With Me.ListBox2
.IntegralHeight = True
.Top = Me.ListBox1.Top
.Height = Me.ListBox1.Height
For iCtr = 1 To 20
.AddItem "qwer" & iCtr
Next iCtr
End With
End Sub

greenfalcon wrote:

i wonder if this is even possible

--
greenfalcon
------------------------------------------------------------------------
greenfalcon's Profile: http://www.excelforum.com/member.php...o&userid=13622
View this thread: http://www.excelforum.com/showthread...hreadid=490823


--

Dave Peterson
 
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
listboxes [email protected] Excel Programming 2 March 30th 05 06:41 PM
listboxes [email protected] Excel Programming 3 February 22nd 05 04:01 PM
listboxes [email protected] Excel Programming 2 February 22nd 05 10:31 AM
Userform w/ Multiple listboxes that link miker1999[_13_] Excel Programming 1 April 27th 04 03:22 AM
Userform w/ Multiple listboxes that link miker1999[_12_] Excel Programming 0 April 20th 04 12:35 PM


All times are GMT +1. The time now is 04:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"