ComboBox and AutoFilters

deepheat101

Board Regular
Joined
Jul 26, 2006
Messages
138
Hello Again,

Just a quickie...

How do you populate a ComboBox (on a UserForm) with the results from an AutoFilter'd list? I've been working around using "EntireRow.Hidden = True", but (1) I'm not certain of the syntax and (2) I'm not entirely sure if it's the right thing to use.

Many Thanks
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
If anyone has an answer to this, it might also solve the problem I posted earlier today regarding combo box input critera. Help please!!
 
Upvote 0
Hmmm...

Having spent the weekend pondering over this problem, I am still none-the-wiser...

I only need a pointer in the right direction.

Any help is much appreciated
 
Upvote 0
Sometimes, just sometimes, I need to stop thinking that that Excel VB has to be complicated to work...

Code:
Private Sub UserForm_Initialize()

    LastRow = Range("F" & Rows.Count).End(xlUp).Row - 1
    
    For Each c In Range("F2:F" & LastRow)
    
        If c.EntireRow.Hidden = False Then
        
           ComboBox1.AddItem c.Value
        
        End If
        
    Next c

End Sub


:rolleyes:
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top