Results 1 to 5 of 5

Create combobox .list excluding some columns

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-21-2004
    Location
    Norwich, CT USA
    MS-Off Ver
    Excel 2010
    Posts
    163

    Create combobox .list excluding some columns

    I have a Combobox that is created based on a named range of column headings. Starting with the first column, every other column is titled “ (required) “. I do not want the “ (required) “ Headings in the Combobox. Any suggestions on how to do this?
    Problem area is in the last few lines few code

    Private Sub UserForm_Initialize()
    
    Dim lastRow As Integer
    Dim emplArr
    Dim frmTop As Integer
    Dim startRowCnt As Integer
    Dim endRowCnt As Integer
    Dim holder As String
    Dim chbxTmp As Control
    Dim topicRng As Range
    
    
     lastRow = Range(Range("b2"), Range("b2").End(xlDown)).Count + 1
    
      frmTop = 80
      emplArr = Range("B2:B" & lastRow)
      
      'list the names
      With lstAttendees
            .List = Range(Range("b2"), Range("b2").End(xlDown)).Value
            .ListStyle = fmListStyleOption
            .MultiSelect = fmMultiSelectMulti
      End With
    
      
      Me.Height = (lastRow - 5) * 20 + 180
        Me.ScrollHeight = Me.Height
      Me.Height = Me.Height * 0.5
      Me.ScrollBars = fmScrollBarsVertical
      
      'PROBLEM HERE
      'setup Topic Listbox
        Set topicRng = Range("topics")
        cbx_Topic_Choice.List = Application.WorksheetFunction.Transpose(topicRng)
    
    End Sub
    File attached if that helps.
    The code is initialized by the "Update Topics" button at the bottom of the data on the first worksheet.

    Thanks
    Robert
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1