在VBA中,intersect的实例应用!

2024-10-11 21:10:34

1、实例【在表格中隔行插入空行?】

在VBA中,intersect的实例应用!

3、会进入VBA编辑界面!点击菜单栏【插入】,在其下拉菜单中,选择【模块】!

在VBA中,intersect的实例应用!

5、在代码编辑窗口输入以下代码:Sub 隔行插入()For i = 0 To Columns("a:a").呶蓟鹭毵End(xlDown).Row * 2 Step 2 Intersect([a1:f2].Offset(i), [a2:f3].Offset(i)).EntireRow.InsertNextEnd Sub

在VBA中,intersect的实例应用!

7、我们发现在工作表中,插入空行成功!

在VBA中,intersect的实例应用!
猜你喜欢