开发者

excel: button per row to copy & paste hidden row

I want to have a sheet with several rows, each w开发者_如何学编程ith a '+' button. When the button is clicked, a "template" row that is hidden is copy&insert below the row of the button.


Assuming that the hidden row is row 2 and that you only need a single button that will copy row 2 to the row below the active cell:

    Sub CopyRow
       Rows("2:2").Copy Destination:=Cells(ActiveCell.Row + 1, 1)
    End sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜