📜  带有过滤器的 excel vba 复制范围 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:57.349000             🧑  作者: Mango

代码示例1
Sub ExtractVisibleCells()

    Dim wsSource, wsExtract As Worksheet

    Set wsSource = ThisWorkbook.Sheets("Source Data")
    Set wsExtract = ThisWorkbook.Sheets("Filtered")

    wsSource.Range("A1:A10").SpecialCells(xlCellTypeVisible).Copy
    wsExtract.Cells(1, 1).PasteSpecial

End Sub