Pasting filtered data from one worksheet to another

JWILLEY

New Member
Joined
Mar 20, 2009
Messages
8
My form makes sure all data is not filtered upon opening and closing.

I use a listbox6 to populate textbox1. Then textbox1 is used to filter worksheet(Part). However, I am unsuccessful in pasting the filtered data from worksheet(Part) to worksheet(FilterPaste).

I could really use some help. Below is the code I have managed to write so far.


Private Sub CloseForm_Click()
If Worksheets("Part").FilterMode Then
Worksheets("Part").ShowAllData
End If
Worksheets("Part").AutoFilterMode = False
Unload Me
End Sub
Private Sub FilterButton_Click()
If Worksheets("Part").FilterMode Then
Worksheets("Part").ShowAllData
End If
TextBox1 = ListBox6.Value
With Worksheets("Part")
.Range("A1:D1").AutoFilter Field:=4, Criteria1:=TextBox1
End With
With Worksheets("FilterPaste")
On Error Resume Next
'CLEAR EXTRACT RANGE AND CRITERIA RANGE
.Range("A1:D1041").Clear
'ADVANCE FILTER DATA
Range("PartList").ADVANCEFILTER _
Action:=x1FilterCopy, CopyToRange:=Range("A1")

End With
End Sub
<!-- / message -->
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,214,983
Messages
6,122,595
Members
449,089
Latest member
Motoracer88

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
Back
Top