Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Location
    Amsterdam
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    List Box with multiple columns (XL97)

    Hello

    I want a listbox with one column showing the 2nd column of the range specified in the code. However the value should be the 1st column of said range. The value is working but I try to use the textColumn property of the listbox to only display the desired column and it shows both columns

    Any idea what I'm doing wrong?

    Mark
    -----------------------------------------
    Dim rngCountries As Range
    With Sheets("countries")
    .Select
    lstCountry.List() = .Range(.Cells(2, 1), .Cells(.UsedRange.Rows.Count, 2))
    End With
    lstCountry.AddItem "Select Country", 0
    lstCountry.BoundColumn = 2
    lstCountry.TextColumn = 1
    lstCountry.ListIndex = 0

  2. #2
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: List Box with multiple columns (XL97)

    Just set the second column to length 0:

    lstCountry.ColumnWidths = "100 pt;0pt"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •