1

我有一张只有一个按钮的工作表,用于添加完成所需的其他行。这很费力,我知道 VBA 可以改进它,但是我是 Power Query 的新手,以及这是否会以任何方式改变 VBA 代码。

非常感谢任何建议。谢谢你

    Sub AddRow()
    ActiveSheet.Unprotect
    Range("A1").End(xlDown).ListObject.ListRows.Add AlwaysInsert:=False
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFormattingCells:=False, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=False, AllowInsertingRows:=False, _
AllowInsertingHyperlinks:=False, AllowDeletingColumns:=False, AllowDeletingRows:=True, _
AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
End Sub
4

0 回答 0