0
votes

I'm using a ActiveX Combo Box to show all or some Worksheets. In addition to that, on the same worksheet I have some Form Controls Check Boxes where the user can use them as filters for the Combo Box. So for instance, each check box have the name of department and so when one is checked the list will be updated with the worksheets related to that name. Which works fine.

However, the problem I have is that if I do choose an option from the Combo Box drop down list, it doesn't come up on the field of the Combo Box.

Here is the code I'm using at the moment.

Private Sub TransferList_DropButtonClick()
    Application.EnableEvents = False
    Dim ws As Worksheet

    I = 1
    TransferList.Clear
    For Each ws In Sheets
        If ActiveSheet.Shapes("CheckBox_Viva").ControlFormat.Value = 1 Then
            TransferList.AddItem ws.Name
            I = I + 1
        End If
    Next ws
    
    Application.EnableEvents = True

End Sub

I did some research and I did find that by using the TransferList_Change the issue is resolved but the filtering is not working (no change whether a check box is True or False).

What am I missing?

Cheers.

Btw, I just started writing the code for the "filtering" so, that is just a first attempt for me to see how it's working. The reason I used 'TransferList_DropButtonClick' is because the number of worksheets changes as well as their names. If you have any alternative, smarter way pls feel free to share. - Geo Koro