VBA Copy the first row of data from a filtered list and past in new workbook

lfriar

New Member
Joined
Jun 15, 2017
Messages
1
I'm trying to take a list of data, and filter it (This will be done outside of a macro).
Once filtered, I want the macro to grab the visible line of data and past that row into a new workbook
If I break this code up, it works, but not together. Getting error code 91

Help is appreciated!!!!


Sub SelectData()
ActiveSheet.AutoFilter.Range.Offset(1).SpecialCells(xlCellTypeVisible).Range(Cells(1, 1), Cells(1, 11)).Select
Selection.Copy
Windows("Policy Review Template.xlsx").Activate
ActiveSheet.Paste
Windows("Policy Records 05-2017.xlsm").Activate
End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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