Show results from AutoFilter in UserForm

K1600

Board Regular
Joined
Oct 20, 2017
Messages
166
I am trying to show results from my spreadsheet after AutoFilter via vba in a UserForm. The AutoFilter is working and shows the correct rows and my process for displaying the UserForm and moving through the responses is working but the UserForm is showing me all the rows in my Table rather than just the filtered results. From searching the net I thing I might need to include something like .SpecialCells(xlCellTypeVisible) but I can't work out where to add it to get it working.

This is what I'm currently working with:

VBA Code:
For r = 1 To rngColVRM.Rows.Count
    With UFCheck
    .TxtVRM.Text = rngColVRM.Cells(r).Value
    .TxtDate.Text = rngColDate.Cells(r).Value
    .TxtDefect1.Text = rngColDefect1.Cells(r).Value
    .TxtDefect2.Text = rngColDefect2.Cells(r).Value
    .TxtDefect3.Text = rngColdefect3.Cells(r).Value
    .TxtMOTDate.Text = rngColMOTDate.Cells(r).Value
    UFCheck.Show
        If .OptClearYes.Value = True Then
            rngColStatus.Value = "Reviewed - System generated"
            rngColStatusDate.Value = Date
            rngColComplete.Value = "Yes"
        End If
    End With
Next
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Watch MrExcel Video

Forum statistics

Threads
1,127,294
Messages
5,623,824
Members
415,991
Latest member
RicardoSS

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