Microsoft Office Tutorials and References
In Depth Information
Inserting Empty Rows in a Range
Figure 23 – Empty Rows Inserted
View the Appendix to learn how to store this procedure
in a Standard module.
Option Explicit¶
' * * * * *¶
Sub InsertBlankRows()¶
'Variable declaration¶
Dim NumRows As Long¶
Dim StartRow As Long¶
Dim EndRow As Long¶
Dim i As Long¶
Dim OldCalculation As Long¶
'Ask for number of rows to insert (Force numbers)¶
On Error Resume Next¶
NumRows = Application.InputBox( _¶
Prompt:="How many rows in between ?", Title:="Insert rows", _¶
If NumRows <= 0 Then¶
'Can not do this¶
Exit Sub¶
End If¶
'Start in row 2¶
StartRow = 2¶
Search JabSto ::

Custom Search