Hi all,
I'm very much a beginner but want to learn! I'm trying to create a macro so I can insert new blank rows in throughout my worksheets. I wanted to be prompted to enter a number, and then for the new lines to appear below the line I have selected. So far, the macro I have been working from is:
' Sub InsertRows()
Dim x As Integer
x = Application.InputBox("Number of Rows", "Number of Rows", Type:=1)
Range(ActiveCell, ActiveCell.Offset(x - 1, 0)).EntireRow.Insert Shift:=xlDown
End Sub
'
There's a glitch I can't figure out, however. It seems to work ok for entering numbers smaller than 10, but if I want more than that, it will only give me a few rows at a time. The most I've tried to add so far was about 300, and it only gave me about 10 rows. I would appreciate any assistance!
Thanks,
Heather
Bookmarks