Results 1 to 4 of 4

ActiveX Combobox in worksheet when populating the list based on another Combobox get error

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    ActiveX Combobox in worksheet when populating the list based on another Combobox get error

    When the selection chosen in Combobox3 is changed the following code runs. The issue occurs at the following lines

    ComboBox1.List = .Range("AA2" & .Range("AA" & Rows.Count).End(xlUp).Row).Value
    The actual error is Run-time error '381': Invalid property array index

    any help identifying the issue would be greatly appreciated.

    Looking at the property window for Combox1 the ListFillRange is empty, so it can't be this that is causing the error.

    Private Sub ComboBox3_Change()
    
    Dim indexDept As Long
    
    indexDept = ComboBox3.ListIndex
    
    ComboBox1.Clear
    
        Select Case indexDept
            Case Is = 0
                With Worksheets("Sheet2")
                    ComboBox1.List = .Range("AA2" & .Range("AA" & Rows.Count).End(xlUp).Row).Value
                End With
        
            Case Is = 1
                With Worksheets("Sheet3")
                    ComboBox1.List = .Range("AA2" & .Range("AA" & Rows.Count).End(xlUp).Row).Value
                End With
      
        End Select
     
    End Sub
    Last edited by jprlimey; 02-27-2020 at 10:53 AM. Reason: SOLVED

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 03-22-2018, 11:25 AM
  2. Replies: 0
    Last Post: 10-26-2015, 04:25 PM
  3. populating combobox based on another combobox selection
    By bqheng in forum Word Programming / VBA / Macros
    Replies: 7
    Last Post: 08-24-2015, 08:52 AM
  4. Populating an ActiveX combobox from a dynamic list
    By Mel_GC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2014, 11:10 AM
  5. Populating Combobox based on Combobox selection from EXCEL worksheet
    By JChaney17 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-04-2014, 08:14 AM
  6. Removing Duplicates from ComboBox and Populating one combobox based on another
    By kbmtech in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2010, 11:17 PM
  7. Populating the list in a combobox based off the value chosen in another combobox
    By Mervil in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2010, 11:50 AM

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