VBA - 在动态标题下方插入行 [英] VBA - Insert rows below a dynamic header

查看:277
本文介绍了VBA - 在动态标题下方插入行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找在电子表格顶部的冻结标题行下面插入一个新行。我所面对的问题是标题中的行数量在不断变化,但是我总是希望将行插入标题下方的第一行。那行里有一个国旗表示冻结了吗?我可以使用所述标志计算行数,添加1并插入行。任何帮助将是非常有帮助的。

I am looking to insert a new row below a frozen header row at the top of a spreadsheet. The issue I face is the amount of rows in the header is ever changing but I always want the row to be inserted at the first line below the header. Is there a flag in the row that says its frozen? which I could just count the amount of rows with said flag, add 1 and insert row. Any help would be very helpful.

Matt

推荐答案

都是!

Sub InsertRowBelowHeader()
    Rows(ActiveWindow.SplitRow + 1).Insert
End Sub

这篇关于VBA - 在动态标题下方插入行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆