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
This is what I'm currently working with:
.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