No need to select anything, and On Error Resume Next
shouldn't be used in most cases. It hides all errors, best to check if the error can be avoided all together.
Edit 2:
Have left original code at bottom of post to put comments in context. Not sure about the Autofilter needs a header range - I think I've assumed this before, but filtering DataBodyRange did filter out the first row when it didn't contain the filter text. I've used COUNTA (3) with the SUBTOTAL to count the visible rows in the range.
Sub Test()
'Be explicit where the table is. ThisWorkbook is the file containing the code, Tabell328 is on Sheet1.
Dim lo As ListObject
Set lo = ThisWorkbook.Worksheets("Sheet1").ListObjects("Tabelle328")
With lo
.Range.AutoFilter Field:=6, Criteria1:="FALSCH"
'How many rows are left?
If Application.WorksheetFunction.Subtotal(3, .ListColumns(1).DataBodyRange) > 0 Then
'Set a reference to the visible cells.
'Start at "GuV Ext. CMIS" and the next two columns.
Dim RangeToCopy As Range
Set RangeToCopy = .ListColumns("GuV Ext. CMIS").DataBodyRange.Resize(, 3).SpecialCells(xlCellTypeVisible)
'Copy and paste just the values to the destination.
RangeToCopy.Copy
ThisWorkbook.Worksheets("Sheet1").Range("O12").PasteSpecial Paste:=xlPasteValues
Else
MsgBox "No rows to copy"
End If
End With
End Sub
Original code - see comments as to why it wouldn't always work.
Sub Test()
'Be explicit where the table is. ThisWorkbook is the file containing the code, Tabell328 is on Sheet1.
Dim lo As ListObject
Set lo = ThisWorkbook.Worksheets("Sheet1").ListObjects("Tabelle328")
With lo
'Filter just the body of data, not the table headers as well.
.DataBodyRange.AutoFilter Field:=6, Criteria1:="FALSCH"
'How many rows are left? Just the headers, or more than that?
If lo.Range.SpecialCells(xlCellTypeVisible).Rows.Count > 1 Then
'Set a reference to the visible cells.
'Start at "GuV Ext. CMIS" and the next two columns.
Dim RangeToCopy As Range
Set RangeToCopy = lo.ListColumns("GuV Ext. CMIS").DataBodyRange.Resize(, 3).SpecialCells(xlCellTypeVisible)
'Copy and paste just the values to the destination.
RangeToCopy.Copy
ThisWorkbook.Worksheets("Sheet1").Range("O12").PasteSpecial Paste:=xlPasteValues
Else
MsgBox "No rows to copy"
End If
End With
End Sub
Edit: Change .DataBodyRange.Resize(, 3)
to .Range.Resize(,3)
in RangeToCopy if you want to include headers.
With statement
How to avoid using Select in Excel VBA