Filter and copy entire row

  • Thread starter Thread starter yami-s
  • Start date Start date
Y

yami-s

Hi,
I'm newbe at VB.
I have a form that runs an table in a work sheet.
I have combox in the form that pull its content from a parameter
sheet.
The qustion is how can I filtter the table trough the combox, and cop
the filtered data into another sheet

10x
yam
 
this pseudo code might give you some ideas:

Private Sub Combobox1_Click()
Dim rng as Range
with worksheets("sheet1")
if .AutofilterMode then .AutofilterMode = False
.Range("A1:F200").AutoFilter Field:=1, Criteria1:=Combobox1.Text
set rng = .Autofilter.Range
rng.offset(1,0).Resize(rng.rows.count-1).Copy _
Destination:=Worksheets("Sheet2").Cells(rows.count,1).End(xlup)
End With
End Sub
 
Thanks,
it looks great.
I'll get in the office and try it first thing in the morning
yami
 
Back
Top