Hi I have the below code(below) that works off a button, to copy an entire row it works fine, however for some reason When the sheet is filtered, it just inserts a blank line, any ideas?
Code:
Sub Copy_paste()
Dim MyPassword As String
MyPassword = "Yes"
If InputBox("Please enter password to continue.", "Enter Password") <> MyPassword Then
Exit Sub
End If
ActiveSheet.Unprotect Password:="1234"
ActiveCell.EntireRow.Select
Selection.Copy
Selection.Insert
ActiveSheet.Protect Password:="1234", AllowFiltering:=True, AllowFormattingColumns:=True, Contents:=True, DrawingObjects:=True, UserInterfaceOnly:=True, AllowFormattingCells:=True
End Sub
Last edited: