Hi All,
I found a very helpful code that I have used in one of my spreadsheets. I am hoping to have it amended to where the input box is removed and instead it automatically inserts the rows based upon the cell value of "A1". As it is currently written, the input box pops up and the user then has to hit enter, I don't want to have the user hit enter after the macro is run. Your thoughts are appreciated. THANKS!
I found a very helpful code that I have used in one of my spreadsheets. I am hoping to have it amended to where the input box is removed and instead it automatically inserts the rows based upon the cell value of "A1". As it is currently written, the input box pops up and the user then has to hit enter, I don't want to have the user hit enter after the macro is run. Your thoughts are appreciated. THANKS!
Code:
ActiveCell.Copy 'So you do not have to preselect entire row
If vRows = 0 Then
vRows = Application.InputBox(prompt:= _
"How many rows do you want to add?", Title:="Add Rows", _
Default:=Range("A1"), Type:=1) 'Default for 1 row, type 1 is number
If vRows = False Then Exit Sub
End If