filter results to userform-sheet

  • Thread starter Thread starter paulvandelaar
  • Start date Start date
P

paulvandelaar

Hello, All

I made a userform with a sheet in it and now i want the results of a
filtered normal worksheet transfered to the sheet on the userform.

How do i realise that ?
 
Hello, All

I made a userform with a sheet in it and now i want the results of a
filtered normal worksheet transfered to the sheet on the userform.

How do i realise that ?

Transfer the contents of visible cell(s) to the user form

N10:)
 
Private Sub UserForm_Activate()
Dim rng As Range
Dim iRow As Integer
Dim iCol As Integer
Set rng = Sheets("Sheet1").UsedRange
For iRow = 1 To rng.Rows.Count
For iCol = 1 To rng.Columns.Count
Spreadsheet1.Cells(iRow, iCol) = rng.Cells(iRow, iCol)
Next iCol
If rng.Rows(iRow).Hidden = True Then _
Spreadsheet1.Rows(iRow).EntireRow.Hidden = True
Next iRow
End Sub


Hth,
Merjet
 
Back
Top