Hi All I am hoping someone can help me with this macro. I am trying to write a sub that will allow the user to click any cell in a row, run the macro, and insert the desired number of rows based on the users input. I can not get the "Rows" statement to accept my variables, any help would be appreciated.
Code:
Sub InsertRows()
Dim I As Integer
Dim C As Integer
Dim T As Integer
I = InputBox("How many rows would you like to add?", "Add Rows above selected")
C = ActiveCell.Row
T = C + (I - 1)
Rows("C:T").Select
Selection.Insert Shift:=xlDown
End Sub