List Box

  • Thread starter Thread starter mwagon73
  • Start date Start date
M

mwagon73

I need to know if it is possible to fill a List Box from either
different worksheet or an Access Database. If this is possible can yo
point me in the right direction
 
I put two listboxes on a worksheet.

One was from the Forms toolbar and the second was from the control toolbox
toolbar:

Option Explicit
Private Sub Worksheet_Activate()
'forms toolbar
Me.ListBoxes("list box 1").List _
= Worksheets("sheet1").Range("a1:a10").Value

'controltoolbox toolbar
Me.ListBox1.List = Worksheets("sheet1").Range("a1:a10").Value
End Sub

And you could even loop through the cells picking up just the ones you wanted.

John Walkenbach has a technique for keeping unique entries and even sorting
them.

http://j-walk.com/ss/excel/tips/tip47.htm
 
Back
Top