Hi all,
I have written a simple macro to insert a row between each of a preset range of rows.
Sub InsertRows()
For i = 1 To 5
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Next i
End Sub
Is it possible to have a pop up input box for the user to input the number of rows to insert when the macro is run?
eg. Alt F8 and select InsertRows macro
Pop up box to input number of rows
Click "ok" and the macro continues to run to insert the rows.
Thanks in advance.
I have written a simple macro to insert a row between each of a preset range of rows.
Sub InsertRows()
For i = 1 To 5
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Next i
End Sub
Is it possible to have a pop up input box for the user to input the number of rows to insert when the macro is run?
eg. Alt F8 and select InsertRows macro
Pop up box to input number of rows
Click "ok" and the macro continues to run to insert the rows.
Thanks in advance.
