I need to add to the code below to also copy the value of cell 'Q3' down into each row each time the macro is enabled.
Sub New_Risk()
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
ActiveSheet.Unprotect "shearer"
With ActiveCell
Rows(RowNum & ":" & RowNum).Insert Shift:=xlDown
Rows(RowNum - 1 & ":" & RowNum - 1).Copy Range("A" & RowNum)
Range(RowNum & ":" & RowNum).SpecialCells(xlCellTypeConstants).ClearContents
End With
Application.CutCopyMode = False
ActiveSheet.Protect "shearer", AllowFormattingColumns:=True, AllowFormattingRows:=True, AllowFiltering:=True
End Sub
Does anyone know if I need to add this to the 'Copy Range' part of this code or somewhere else?
Cheers!
Sub New_Risk()
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
ActiveSheet.Unprotect "shearer"
With ActiveCell
Rows(RowNum & ":" & RowNum).Insert Shift:=xlDown
Rows(RowNum - 1 & ":" & RowNum - 1).Copy Range("A" & RowNum)
Range(RowNum & ":" & RowNum).SpecialCells(xlCellTypeConstants).ClearContents
End With
Application.CutCopyMode = False
ActiveSheet.Protect "shearer", AllowFormattingColumns:=True, AllowFormattingRows:=True, AllowFiltering:=True
End Sub
Does anyone know if I need to add this to the 'Copy Range' part of this code or somewhere else?
Cheers!