Hey guys,
So essentially I have used this code to be able to add a row in a specific place on my sheet. What I'm needing help with is creating a vba similar to this to DELETE a row. This is what I used to create a row. Any help would be great regarding how I can create one with a similar stuff (like the user being able to type in a specific row number) Thanks!
Sub AddARow()
Dim varUserInput As Variant
varUserInput = InputBox("Enter Row Number where you want to add a row:", _
"What Row?")
If varUserInput = "" Then Exit Sub
RowNum = varUserInput
Rows(RowNum & ":" & RowNum).Insert Shift:=xlDown
Rows(RowNum - 1 & ":" & RowNum - 1).Copy Range("A" & RowNum)
Range(RowNum & ":" & RowNum).ClearContents
End Sub
Bookmarks