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