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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

MrHaggis

New Member
Joined
Oct 6, 2006
Messages
18
If anyone has an answer to this, it might also solve the problem I posted earlier today regarding combo box input critera. Help please!!
 

deepheat101

Board Regular
Joined
Jul 26, 2006
Messages
138
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
 

deepheat101

Board Regular
Joined
Jul 26, 2006
Messages
138
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:
 

Forum statistics

Threads
1,136,349
Messages
5,675,244
Members
419,557
Latest member
razlevav

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
Top