|
Sub 插入一行()
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub
Sub 指定单元格()
Dim i As Integer
Set ws = Sheet1.Range("a1")
For i = 1 To ws
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Next i
End Sub
Sub 弹出()
Dim i As Integer
Dim ws As Integer
ws = InputBox("请插入多少行", "温馨提示")
For i = 1 To ws
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Next i
End Sub
|
|