Sub ShopeEntry()
Sheets("Entry").Select
Range("D5").Select
If IsEmpty(Selection.Value) = False Then
Sheets("Entry").Select
Dim last_row As Long
last_row = Cells(Rows.Count, 4).End(xlUp).Row
Range(Cells(5, 3), Cells(last_row, 10)).Select
Selection.Copy
Sheets("List").Select
Selection.Protect Password:="Password", UserInterfaceOnly:=True
Sheets("List").Select
Range("C2").Select
Selection.Insert Shift:=xlDown
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheets("Entry").Select
Range("D5").Select
End If
End Sub
When I run this Code in Excel VBA, an Error message shows up at the Paste Special Command.
Basically, the code is supposed to copy the entries from Sheet "Entry" Then Insert & Paste only Values in Sheet "List"
Sheet List has a protection password that must be preventing other users from editing but still let VBA code paste the values.
Error Message is "Run-time error '1004': Select Method of Range Class Failed"
Kindly, let me know if you managed to get what needs to be done to get it running smoothly!
Thank you in advance!
Sheets("List").Protect Password:="Password", UserInterfaceOnly:=True