Copy Paste Filtered Data to Another Workbook

How to copy paste filtered data to another workbook automatically using VBA. Below is the complete VBA code with some code-lines commented: Sub CopyAutoFilteredDataToAnotherWorkbook() Dim OtherWorkbook As Workbook Dim myDB As Range With ActiveWorkbook.Sheets(“Sheet1”) Set myDB = .Range(“A1:B1”).Resize(.Cells(.Rows.Count, 1).End(xlUp).Row) ‘myDB.Select End With With myDB .AutoFilter field:=2, Criteria1:=”Recruiting Manager” .SpecialCells(xlCellTypeVisible).Copy End With Set OtherWorkbook = Workbooks.Open(“C:\Users\takyar\Desktop\test-for-filtered-data.xlsx”) […]