filter results to userform-sheet

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 ?
 
N

N10

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:)
 
M

merjet

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top